This document is mainly for part5 of the GEO data set analysis, that is the normalisation and batch correction step.

Cord blood only have one sample.

1. load data and packages

library(tidyverse)
library(readxl)
library(minfi)
library(magrittr)
library(tibble)
library(data.table)
library(limma)
library(ewastools)
library(ENmix)
library(wateRmelon)
library(FactoMineR)
library(WGCNA)
library(impute)
library(ChAMP)
library(sva)
library(quantro)
library(doParallel)
library(ggplot2)
library(RColorBrewer)
pal <- brewer.pal(8, "Dark2")

# GEOmeta, GEO_phenotypes
load(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/GEO_phenotypes_add10.RData")

# Msets
# Mset_450k_normalPlacenta_v1, Mset_EPIC_normalPlacenta, Mset_EPIC_normalPlacenta_ourStudy, 
# Mset_450k_Amnion, Mset_EPIC_Amnion, # Mset_450k_Chorion, Mset_EPIC_Chorion,
# Mset_450k_Decidua, Mset_EPIC_Decidua, # Mset_450k_MaternalBlood_v1, Mset_450k_mesenchyme,
# Mset_450k_trophoblast, Mset_450k_UC, Mset_450k_UCB,
load(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/MsetsOf9TissueTypes.RData")

# Join.df_v2, GEO_phenotypes_joinedSamples, MDS_joinedSamples
load(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/GEO_joinedSamples551_Beta_MDS.RData")

# annotation needed for using functions
ann450k <- readRDS(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/ann450k_GEO15sets.rds")
annEPIC <- readRDS(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/annEPIC_GEO15sets.rds")

2. Nomalisation

There are many tissue types for normal tissue samples around placenta, such as cord blood, chorionic plate and so on. I used modified BMIQ method to normalise different tissue separately.

** When I used GSE74738 as gold standard, the batches were not corrected very well; Then I try to use GSE75248 as gold standard because this dataset have 174 placental samples which is the biggest dataset for placenta sampels. However, the result of this calibration is even worse than using GSE74738 as gold standard**

There are 9 tissue types (we choose tissue types located near placenta) in total from GEO.

A) Function for and normalisation using BMIQ_Horvath.R

Source Horvath’s modified BMIQ functions, the function that need to be called in NormFUN,

  • I source the code for modified BMIQ normalisation, the BMIQcalibration function will be used in the NormFUN chunk.
# `BMIQcalibration` function in `BMIQ_Horvath.R`
source(file = "~/DNAme/Process_decidual/Rcodes/BMIQ_Horvath.R")
## Loading required package: RPMM
## Loading required package: cluster
## 
## Attaching package: 'RPMM'
## The following object is masked from 'package:limma':
## 
##     ebayes

Write function CalibrateFUN

We first need to normalise with BMIQ and then calibrate data with BMIQ_calibration use my CalibrateFUN

normalise Msets with BMIQ method

  # annotation: ann450k or annEPIC, need to be a DataFrame, annataion from the illumina annotation package
registerDoParallel(cores = 10)
  
  # do BMIQ normalisation for all Msets
  Msets <- c('Mset_450k_normalPlacenta_v1', 'Mset_EPIC_normalPlacenta', 'Mset_EPIC_normalPlacenta_ourStudy',
           'Mset_450k_Amnion', 'Mset_EPIC_Amnion',
           'Mset_450k_Chorion', 'Mset_EPIC_Chorion','Mset_450k_Decidua', 'Mset_EPIC_Decidua', 
           'Mset_450k_MaternalBlood_v1', 'Mset_450k_mesenchyme','Mset_450k_trophoblast', 
           'Mset_450k_UC', 'Mset_450k_UCB')
  
  ## normalise beta value for this tissue type
  ListToJoin <- list()
  
  # get BMIQ normalised beta values
  for(i in Msets){
  # get the object
  Mset <- get(i)
  
  # names for the list
  listElements <- paste0("normB", str_replace_all(i, "Mset", ""), ".df")

  # fill the list with beta values
  ListToJoin[[listElements]] <- wateRmelon::BMIQ(beta.v = Mset) %>% 
    as.data.frame() %>% rownames_to_column(var="Probe")
  
  }
## Loading required package: IlluminaHumanMethylation450kmanifest
  # left_join values form all samples
  Join_allNorm.df <- ListToJoin %>% purrr::reduce(left_join, by = "Probe")
  # omit na values
  Join_allNorm.df_v1 <- na.omit(Join_allNorm.df)
  # as matrix
  Join_allNorm.df_v2 <- Join_allNorm.df_v1 %>% remove_rownames() %>%
  column_to_rownames(var="Probe") %>% as.matrix() # 298179
  
  # phenotypes of all samples form all the tissue types
  phenotype_matched <- GEO_phenotypes[match(colnames(Join_allNorm.df_v2),GEO_phenotypes$Sample_name),]
  
  # M values
  Mnorm <- log2(Join_allNorm.df_v2/(1 - Join_allNorm.df_v2))
  Mnorm_v1 <- Mnorm[apply(Mnorm, 1, function(x) all(is.finite(x))), , drop=FALSE]
  
  # plot MDS
  ## MDS for M values
  MDS_norm551.M <- plotMDS(Mnorm_v1, top = nrow(Mnorm_v1), 
                           labels = phenotype_matched$Sample, gene.selection = "common")

  ## MDS for Beta values
  MDS_norm551.Beta <- plotMDS(Join_allNorm.df_v2, top = nrow(Join_allNorm.df_v2), 
                           labels = phenotype_matched$Sample, gene.selection = "common")

  # put into a list
  NormBMlist <- list(NormBAll=Join_allNorm.df_v2, NormMAll=Mnorm_v1, 
                     phenoDataAll=phenotype_matched, 
                     MDS_norm551.Beta=MDS_norm551.Beta, MDS_norm551.M=MDS_norm551.M)
  
  saveRDS(NormBMlist, file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/NormBMlist.rds")

CalibrateFUN calibrate all tissue types together, while CalibrateFUN2 calibrate data from different tissue types separately.

TissueType could be: Placenta, Amnion, Chorion, Decidua, Maternal whole blood, placental mesenchyme, placental trophoblast, umbilical cord, Umbilical cord blood.

  # write the BMIQ_calibration function: `CalibrateFUN` calibrate all tissue types together
CalibrateFUN <- function(GoldStaStudy){
  
  # load data
  NormBMlist <- readRDS(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/NormBMlist.rds")

  ## subset beta values for gold standard
  GoldSta <- NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Study%in%GoldStaStudy,]
  BetaMat_GoldSta <- NormBMlist$NormBAll[,colnames(NormBMlist$NormBAll)%in%GoldSta$Sample_name, drop=FALSE]

  # calculate gold standard mean
  BetaMat_GoldSta_t <- BetaMat_GoldSta %>% t()
  gold.mean=as.numeric(apply(BetaMat_GoldSta_t,2,mean,na.rm=TRUE))
  
  # use `BMIQcalibration` to normalise data; for inputs, rows are samples, colums are CpGs.
  BetaMat_Calibrated <- BMIQcalibration(datM=t(NormBMlist$NormBAll), goldstandard.beta=gold.mean)
  BetaMat_Calibrated_t <- BetaMat_Calibrated %>% t()

  # match phenodata
  BetaMat_Calibrated_phenoData <-  NormBMlist$phenoDataAll[
    match(colnames(BetaMat_Calibrated_t), NormBMlist$phenoDataAll$Sample_name),]
  
  # return list containing beta and M values
  ## calculate M values
  MMat_Calibrated <- log2(BetaMat_Calibrated_t/(1 - BetaMat_Calibrated_t))
  MMat_Calibrated_v1 <- 
      MMat_Calibrated[apply(MMat_Calibrated, 1, function(x) all(is.finite(x))), , drop=FALSE]

  # return beta and M values
  BM_List <- list(Beta = BetaMat_Calibrated_t, 
                  BetaPhenoData = BetaMat_Calibrated_phenoData,
                  M = MMat_Calibrated_v1)
  return(BM_List)

}


# if I want to calibrate different tissue types seperately, I can use the following function
# CalibrateFUN2 <- function(GoldStaStudy){
#   registerDoParallel(cores = 10)
# 
#   # load data
#   NormBMlist <- readRDS(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/NormBMlist.rds")
#   
#   # all 9 tissue types
#   # We removed "Maternal whole blood", because all maternal blood samples are from GSE66210, not the GSE74738
#   TissueTypes <- c("Placenta", "Amnion", "Chorion", "Decidua",
#                 "placental mesenchyme", 
#                 "placental trophoblast", "umbilical cord", "Umbilical cord blood")
#   
#   # create a list to hold all calibrated B values
#   ListToJoin <- list()
#   
#   for(i in TissueTypes){
#   # subset pheno data for each tissue type  
#   sampleNamesForOneTissue <- NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Sample%in%i,,drop=FALSE]
#   
#   BetaMat_1Tissue <- NormBMlist$NormBAll[,colnames(NormBMlist$NormBAll)%in%sampleNamesForOneTissue$Sample_name, drop=FALSE]
#   
#   ## subset beta values for gold standard
#   GoldStaForOneTissue <- NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Sample%in%i &
#                                                  NormBMlist$phenoDataAll$Study%in%GoldStaStudy,,drop=FALSE]
#   
#   BetaMat_1Tissue_GoldSta <- NormBMlist$NormBAll[,colnames(NormBMlist$NormBAll)%in%GoldStaForOneTissue$Sample_name,
#                                                  drop=FALSE]
#   
#   # calculate gold standard mean
#   BetaMat_1Tissue_GoldSta_t <- BetaMat_1Tissue_GoldSta %>% t()
#   gold.mean=as.numeric(apply(BetaMat_1Tissue_GoldSta_t,2,mean,na.rm=TRUE))
# 
#   # use `BMIQcalibration` to normalise data; for inputs, rows are samples, colums are CpGs.
#   BetaMat_1TissueCalibrated <- BMIQcalibration(datM=t(BetaMat_1Tissue), goldstandard.beta=gold.mean)
#   BetaMat_1TissueCalibrated_t <- BetaMat_1TissueCalibrated %>% t()
# 
#   # names for the list
#   listElements <- paste0("normCaliB_", str_replace_all(i, " ", "_"), ".df")
# 
#   # fill the list with beta values (9 tissue types)
#   ListToJoin[[listElements]] <- BetaMat_1TissueCalibrated_t %>% 
#                          as.data.frame() %>% rownames_to_column(var="Probe")
#   } # end for
#   
#   # left_join values, to join all samples
#   Join_allNormCali.df <- ListToJoin %>% purrr::reduce(left_join, by = "Probe")
#   
#   # omit na values
#   Join_allNormCali.df_v1 <- na.omit(Join_allNormCali.df)
#   
#   # as matrix
#   Join_allNormCali.df_v2 <- Join_allNormCali.df_v1 %>% remove_rownames() %>%
#   column_to_rownames(var="Probe") %>% as.matrix() # 298179
#   
#   # phenotypes of all samples form all the tissue types
#   AllNormCali_phenotype_matched <-
#     NormBMlist$phenoDataAll[match(colnames(Join_allNormCali.df_v2),NormBMlist$phenoDataAll$Sample_name),]
#   
#   # M values
#   MnormCali <- log2(Join_allNormCali.df_v2/(1 - Join_allNormCali.df_v2))
#   MnormCali_v1 <- MnormCali[apply(MnormCali, 1, function(x) all(is.finite(x))), ,drop=FALSE]
#   
#   # return beta and M values
#   BM_List <- list(Beta = Join_allNormCali.df_v2, 
#                   BetaPhenoData = AllNormCali_phenotype_matched,
#                   M = MnormCali_v1)
#   return(BM_List)
#   
# }

B) Use the function CalibrateFUN to get normalised beta and M values for all the samples from 9 kinds of tissues located around placenta during early development.

#, warning=FALSE, message=FALSE
# calibrate all data together, gold standard is GSE75248, the biggest study
normCali_BMof9TissueTypes_CaliTogether <- CalibrateFUN(GoldStaStudy = "GSE75248") 
## [1] "Fitting EM beta mixture to goldstandard probes"
## [1] Inf
## [1] 0.004291609
## [1] 0.005029633
## [1] 0.005846578
## [1] 0.006186197
## [1] "Done"
## ii= 1
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005067143
## [1] 0.001306636
## [1] 0.001215709
## [1] 0.001026226
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 2
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003877849
## [1] 0.001418894
## [1] 0.001579609
## [1] 0.001723314
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 3
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004365881
## [1] 0.001252969
## [1] 0.001172409
## [1] 0.001116924
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 4
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003161242
## [1] 0.001462195
## [1] 0.002029076
## [1] 0.002012765
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 5
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003894542
## [1] 0.002908811
## [1] 0.003555411
## [1] 0.003471099
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 6
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003083511
## [1] 0.001712612
## [1] 0.002321906
## [1] 0.001997988
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 7
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003459549
## [1] 0.001538716
## [1] 0.001403033
## [1] 0.001497435
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 8
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004694951
## [1] 0.001179772
## [1] 0.001207254
## [1] 0.001167026
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 9
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003730109
## [1] 0.001460327
## [1] 0.001315005
## [1] 0.001431887
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 10
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003407794
## [1] 0.001394852
## [1] 0.002053395
## [1] 0.001939298
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 11
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00360314
## [1] 0.001340601
## [1] 0.001729715
## [1] 0.001995557
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 12
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003581482
## [1] 0.001947737
## [1] 0.002739098
## [1] 0.002717128
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 13
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003794867
## [1] 0.001569977
## [1] 0.002053563
## [1] 0.002150625
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 14
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004496709
## [1] 0.001981816
## [1] 0.003135482
## [1] 0.003312448
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 15
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004922474
## [1] 0.000970241
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 16
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004472581
## [1] 0.001709068
## [1] 0.001629776
## [1] 0.00196815
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 17
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005081555
## [1] 0.001427472
## [1] 0.0009279716
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 18
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003734995
## [1] 0.001021171
## [1] 0.001533956
## [1] 0.00176927
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 19
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003533846
## [1] 0.001055902
## [1] 0.001316381
## [1] 0.00153567
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 20
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00374296
## [1] 0.0009840665
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 21
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004312181
## [1] 0.001461938
## [1] 0.002213167
## [1] 0.002385601
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 22
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003697853
## [1] 0.001103485
## [1] 0.001195817
## [1] 0.001517793
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 23
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004162116
## [1] 0.001510772
## [1] 0.001400676
## [1] 0.001775739
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 24
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004128617
## [1] 0.00128873
## [1] 0.001450044
## [1] 0.001901674
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 25
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004522071
## [1] 0.001528997
## [1] 0.002519275
## [1] 0.002802847
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 26
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003930275
## [1] 0.001847127
## [1] 0.002622717
## [1] 0.002666898
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 27
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003597418
## [1] 0.001203049
## [1] 0.001765684
## [1] 0.002058149
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 28
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00338723
## [1] 0.001184752
## [1] 0.001182753
## [1] 0.001257635
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 29
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004171174
## [1] 0.002391013
## [1] 0.003266231
## [1] 0.003325166
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 30
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004373788
## [1] 0.001547527
## [1] 0.00110073
## [1] 0.001346364
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 31
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003459881
## [1] 0.00114724
## [1] 0.001797457
## [1] 0.001992013
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 32
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004041698
## [1] 0.001325446
## [1] 0.00143691
## [1] 0.001739361
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 33
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004020004
## [1] 0.001240853
## [1] 0.001335653
## [1] 0.001634525
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 34
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005104945
## [1] 0.001588248
## [1] 0.0008442185
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 35
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003746672
## [1] 0.001131619
## [1] 0.001461366
## [1] 0.001685703
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 36
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003209255
## [1] 0.001424919
## [1] 0.001759188
## [1] 0.001805924
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 37
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003361984
## [1] 0.00136832
## [1] 0.001493308
## [1] 0.001613815
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 38
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004088306
## [1] 0.001433486
## [1] 0.002470026
## [1] 0.002603205
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 39
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003343356
## [1] 0.001277959
## [1] 0.001490466
## [1] 0.0016537
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 40
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003401315
## [1] 0.001338783
## [1] 0.00133005
## [1] 0.001463034
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 41
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005846612
## [1] 0.001808963
## [1] 0.0009949937
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 42
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005124554
## [1] 0.001297124
## [1] 0.001073733
## [1] 0.001452885
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 43
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006927721
## [1] 0.002457688
## [1] 0.0007642155
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 44
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.008656618
## [1] 0.002839836
## [1] 0.0008041118
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 45
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007934933
## [1] 0.002563491
## [1] 0.0008628467
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 46
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006233611
## [1] 0.001391808
## [1] 0.0009873682
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 47
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.008162456
## [1] 0.002674148
## [1] 0.00118383
## [1] 0.0009234674
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 48
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005385914
## [1] 0.001815595
## [1] 0.001542165
## [1] 0.002367952
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 49
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007213605
## [1] 0.002145706
## [1] 0.0009097991
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 50
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005382652
## [1] 0.002237063
## [1] 0.00130486
## [1] 0.001850381
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 51
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006776544
## [1] 0.002083276
## [1] 0.0009757588
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 52
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004188348
## [1] 0.00100611
## [1] 0.001063449
## [1] 0.001345441
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 53
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006312141
## [1] 0.001821567
## [1] 0.0009925027
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 54
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007619912
## [1] 0.002714698
## [1] 0.000941782
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 55
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007583319
## [1] 0.002534264
## [1] 0.0009365599
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 56
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007293149
## [1] 0.002599594
## [1] 0.001427746
## [1] 0.0009260223
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 57
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004387704
## [1] 0.002063724
## [1] 0.003216016
## [1] 0.003476958
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 58
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004129308
## [1] 0.002255049
## [1] 0.00324841
## [1] 0.003468098
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 59
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00479807
## [1] 0.001903854
## [1] 0.002079449
## [1] 0.002536004
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 60
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004590951
## [1] 0.001768755
## [1] 0.002782744
## [1] 0.003091655
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 61
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004455463
## [1] 0.001665298
## [1] 0.002706028
## [1] 0.003013965
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 62
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00424136
## [1] 0.001475764
## [1] 0.002395649
## [1] 0.002966343
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 63
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004419531
## [1] 0.003032309
## [1] 0.003965154
## [1] 0.004143157
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 64
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004509253
## [1] 0.001966217
## [1] 0.00309514
## [1] 0.003389475
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 65
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003512167
## [1] 0.001368959
## [1] 0.001761701
## [1] 0.002141074
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 66
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003839689
## [1] 0.002614611
## [1] 0.003467823
## [1] 0.003679943
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 67
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004288229
## [1] 0.002029248
## [1] 0.003100741
## [1] 0.003390987
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 68
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004000395
## [1] 0.002487963
## [1] 0.003534424
## [1] 0.003813457
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 69
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004813793
## [1] 0.001871046
## [1] 0.002537869
## [1] 0.002922922
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 70
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0038456
## [1] 0.002443701
## [1] 0.003220766
## [1] 0.003347952
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 71
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00405508
## [1] 0.002965425
## [1] 0.003760021
## [1] 0.003929927
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 72
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004181849
## [1] 0.004276203
## [1] 0.004791003
## [1] 0.004912397
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 73
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003792661
## [1] 0.001770249
## [1] 0.002697929
## [1] 0.002799787
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 74
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003638617
## [1] 0.001411656
## [1] 0.001856491
## [1] 0.001963883
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 75
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00381878
## [1] 0.001297374
## [1] 0.001338194
## [1] 0.001695355
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 76
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004769504
## [1] 0.001204232
## [1] 0.001158578
## [1] 0.001196607
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 77
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004514159
## [1] 0.00147164
## [1] 0.001792244
## [1] 0.002240715
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 78
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003671755
## [1] 0.001415214
## [1] 0.002041457
## [1] 0.002232288
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 79
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003930275
## [1] 0.002269254
## [1] 0.003149868
## [1] 0.003309552
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 80
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004045339
## [1] 0.00151579
## [1] 0.002636788
## [1] 0.002743611
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 81
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004281317
## [1] 0.004505606
## [1] 0.00507722
## [1] 0.004578036
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 82
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004756495
## [1] 0.0058696
## [1] 0.006416131
## [1] 0.005741469
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 83
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004159017
## [1] 0.00286258
## [1] 0.003744762
## [1] 0.003740603
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 84
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004065614
## [1] 0.003903317
## [1] 0.00471985
## [1] 0.00464352
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 85
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003727498
## [1] 0.003913718
## [1] 0.004441187
## [1] 0.004022289
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 86
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004050544
## [1] 0.001463358
## [1] 0.00156857
## [1] 0.001789107
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 87
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003769487
## [1] 0.00148379
## [1] 0.002217537
## [1] 0.002396446
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 88
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003831118
## [1] 0.004598009
## [1] 0.005248864
## [1] 0.004772252
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 89
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003219121
## [1] 0.002901483
## [1] 0.003514718
## [1] 0.002954151
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 90
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00379106
## [1] 0.004455222
## [1] 0.004981593
## [1] 0.004438172
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 91
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00418034
## [1] 0.005630912
## [1] 0.006067683
## [1] 0.005582453
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 92
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002957797
## [1] 0.004269506
## [1] 0.004963253
## [1] 0.004624636
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 93
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004034679
## [1] 0.004347647
## [1] 0.00504792
## [1] 0.004672466
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 94
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003760309
## [1] 0.003371916
## [1] 0.003957653
## [1] 0.003618007
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 95
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004093396
## [1] 0.001337358
## [1] 0.001866704
## [1] 0.002274204
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 96
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003835873
## [1] 0.001404502
## [1] 0.002069992
## [1] 0.002400531
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 97
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00400928
## [1] 0.004339878
## [1] 0.004864835
## [1] 0.004333315
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 98
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004466197
## [1] 0.005348193
## [1] 0.005734195
## [1] 0.005075319
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 99
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004255194
## [1] 0.002127229
## [1] 0.003202328
## [1] 0.003334869
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 100
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004167863
## [1] 0.001927254
## [1] 0.00324796
## [1] 0.003452395
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 101
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003745884
## [1] 0.004759955
## [1] 0.005189724
## [1] 0.004724734
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 102
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004359085
## [1] 0.001616751
## [1] 0.002696252
## [1] 0.002892179
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 103
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003657104
## [1] 0.005519444
## [1] 0.006106155
## [1] 0.005368638
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 104
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003960427
## [1] 0.004286349
## [1] 0.004955176
## [1] 0.00454609
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 105
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003275481
## [1] 0.001676302
## [1] 0.001943591
## [1] 0.002032072
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 106
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0039857
## [1] 0.002128547
## [1] 0.003131069
## [1] 0.003050207
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 107
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002885545
## [1] 0.004765443
## [1] 0.004856769
## [1] 0.003841413
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 108
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003753185
## [1] 0.004160769
## [1] 0.004814346
## [1] 0.00487038
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 109
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004288331
## [1] 0.002784214
## [1] 0.003769208
## [1] 0.003922673
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 110
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00475723
## [1] 0.001905866
## [1] 0.003048717
## [1] 0.003386828
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 111
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003563071
## [1] 0.002154676
## [1] 0.00383207
## [1] 0.003768567
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 112
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00337089
## [1] 0.004197948
## [1] 0.00436183
## [1] 0.003499943
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 113
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003560965
## [1] 0.002560318
## [1] 0.003334692
## [1] 0.003323423
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 114
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003867995
## [1] 0.003805693
## [1] 0.004579179
## [1] 0.004296674
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 115
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00415579
## [1] 0.004312604
## [1] 0.004997468
## [1] 0.004602366
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 116
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004133218
## [1] 0.005113763
## [1] 0.005684807
## [1] 0.005432104
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 117
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005198075
## [1] 0.002106724
## [1] 0.002019559
## [1] 0.002589093
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 118
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003759695
## [1] 0.002497887
## [1] 0.003256023
## [1] 0.003139161
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 119
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004475687
## [1] 0.003292452
## [1] 0.004035347
## [1] 0.004025796
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 120
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004007585
## [1] 0.003225518
## [1] 0.004117764
## [1] 0.004312409
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 121
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003361211
## [1] 0.003065841
## [1] 0.003707044
## [1] 0.003192894
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 122
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004323934
## [1] 0.00150777
## [1] 0.002293318
## [1] 0.00259978
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 123
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004149653
## [1] 0.001418611
## [1] 0.002429501
## [1] 0.00273023
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 124
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003876026
## [1] 0.002590954
## [1] 0.003516852
## [1] 0.003683567
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 125
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003878655
## [1] 0.003438606
## [1] 0.004204967
## [1] 0.004133443
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 126
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004208991
## [1] 0.002375494
## [1] 0.003441819
## [1] 0.003706484
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 127
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004248078
## [1] 0.00255764
## [1] 0.003651103
## [1] 0.003815925
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 128
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00378125
## [1] 0.002218397
## [1] 0.003130613
## [1] 0.00320381
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 129
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00365763
## [1] 0.004671157
## [1] 0.004868855
## [1] 0.004042055
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 130
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004395697
## [1] 0.005135867
## [1] 0.005978977
## [1] 0.005779884
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 131
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003459261
## [1] 0.004606723
## [1] 0.004747691
## [1] 0.003932983
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 132
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004195673
## [1] 0.003272473
## [1] 0.004294337
## [1] 0.004318797
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 133
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003454597
## [1] 0.002960394
## [1] 0.003617382
## [1] 0.003221736
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 134
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003593236
## [1] 0.001716746
## [1] 0.002634587
## [1] 0.002742193
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 135
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004840486
## [1] 0.004059693
## [1] 0.004980444
## [1] 0.005049177
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 136
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00335156
## [1] 0.004665292
## [1] 0.004920574
## [1] 0.004054345
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 137
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003445738
## [1] 0.00459319
## [1] 0.005182513
## [1] 0.00446369
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 138
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004094796
## [1] 0.004125322
## [1] 0.00475285
## [1] 0.004450636
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 139
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004439598
## [1] 0.002934253
## [1] 0.004086884
## [1] 0.004114603
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 140
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003728544
## [1] 0.003139492
## [1] 0.004028566
## [1] 0.003813283
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 141
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003453877
## [1] 0.002164447
## [1] 0.003011743
## [1] 0.002862491
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 142
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003230132
## [1] 0.004072755
## [1] 0.004605569
## [1] 0.00406357
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 143
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004159414
## [1] 0.005327828
## [1] 0.005856989
## [1] 0.005617662
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 144
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00390249
## [1] 0.001441783
## [1] 0.001625086
## [1] 0.001596507
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 145
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003481659
## [1] 0.003928415
## [1] 0.004235317
## [1] 0.003529277
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 146
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004164987
## [1] 0.001447695
## [1] 0.00248598
## [1] 0.002795758
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 147
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003346307
## [1] 0.00191452
## [1] 0.002785611
## [1] 0.00281049
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 148
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003228306
## [1] 0.002437255
## [1] 0.003276694
## [1] 0.003139861
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 149
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004236131
## [1] 0.001631973
## [1] 0.002803267
## [1] 0.00312541
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 150
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003825526
## [1] 0.002396483
## [1] 0.003364374
## [1] 0.00343762
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 151
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003682787
## [1] 0.001422508
## [1] 0.002336723
## [1] 0.002611721
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 152
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004704799
## [1] 0.004871887
## [1] 0.005531211
## [1] 0.005461198
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 153
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004818054
## [1] 0.001570306
## [1] 0.001121144
## [1] 0.001624318
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 154
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004608978
## [1] 0.003001909
## [1] 0.003996895
## [1] 0.004128666
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 155
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003994001
## [1] 0.001984916
## [1] 0.004974334
## [1] 0.004842575
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 156
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0036025
## [1] 0.002004769
## [1] 0.002944389
## [1] 0.002959333
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 157
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003837578
## [1] 0.002317973
## [1] 0.003226816
## [1] 0.003307883
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 158
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003762386
## [1] 0.002116808
## [1] 0.00325169
## [1] 0.003539518
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 159
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003719249
## [1] 0.002453785
## [1] 0.003566767
## [1] 0.003642892
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 160
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00338387
## [1] 0.002115769
## [1] 0.00299003
## [1] 0.002952739
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 161
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003774645
## [1] 0.001276954
## [1] 0.001819537
## [1] 0.002298739
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 162
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004663584
## [1] 0.001860411
## [1] 0.001861598
## [1] 0.002477408
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 163
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003889828
## [1] 0.003757002
## [1] 0.004623227
## [1] 0.004522942
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 164
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004516159
## [1] 0.001641996
## [1] 0.002302387
## [1] 0.002709885
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 165
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003638785
## [1] 0.00125136
## [1] 0.001801767
## [1] 0.002192949
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 166
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00337657
## [1] 0.001522291
## [1] 0.002000719
## [1] 0.002213405
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 167
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004315398
## [1] 0.001678682
## [1] 0.002712649
## [1] 0.002920548
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 168
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003694279
## [1] 0.001563649
## [1] 0.002478916
## [1] 0.00248883
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 169
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004524952
## [1] 0.003390432
## [1] 0.00438233
## [1] 0.00467141
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 170
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004048359
## [1] 0.001379827
## [1] 0.001632329
## [1] 0.001908532
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 171
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004014016
## [1] 0.001921008
## [1] 0.002948123
## [1] 0.003201674
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 172
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00377172
## [1] 0.002335982
## [1] 0.003137667
## [1] 0.003177643
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 173
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003768297
## [1] 0.001367424
## [1] 0.002046437
## [1] 0.002390536
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 174
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004146856
## [1] 0.001171197
## [1] 0.001282148
## [1] 0.001694655
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 175
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004579766
## [1] 0.001603464
## [1] 0.002563769
## [1] 0.00292065
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 176
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004422653
## [1] 0.001310107
## [1] 0.001109837
## [1] 0.001269017
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 177
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004058076
## [1] 0.001606351
## [1] 0.002713418
## [1] 0.002914797
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 178
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004747358
## [1] 0.001870753
## [1] 0.002592938
## [1] 0.002933049
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 179
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004285743
## [1] 0.002057558
## [1] 0.003238373
## [1] 0.003551822
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 180
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003816017
## [1] 0.001921916
## [1] 0.002968398
## [1] 0.003185342
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 181
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003585308
## [1] 0.001737634
## [1] 0.00285354
## [1] 0.003075453
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 182
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004199191
## [1] 0.001447218
## [1] 0.002384369
## [1] 0.002602618
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 183
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004265777
## [1] 0.002543102
## [1] 0.003510357
## [1] 0.003670729
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 184
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005477778
## [1] 0.002390643
## [1] 0.001188435
## [1] 0.001572495
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 185
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004793339
## [1] 0.002831149
## [1] 0.003665253
## [1] 0.003932269
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 186
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003288641
## [1] 0.002191499
## [1] 0.00317631
## [1] 0.003243935
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 187
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004236043
## [1] 0.002106137
## [1] 0.003035395
## [1] 0.003191114
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 188
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004333485
## [1] 0.001674992
## [1] 0.002380278
## [1] 0.002477354
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 189
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004310947
## [1] 0.001576866
## [1] 0.002124635
## [1] 0.00250017
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 190
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004167496
## [1] 0.001498956
## [1] 0.002540452
## [1] 0.002688432
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 191
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004229348
## [1] 0.004536505
## [1] 0.00504064
## [1] 0.004904396
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 192
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004051099
## [1] 0.001489897
## [1] 0.002502341
## [1] 0.002654422
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 193
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004348723
## [1] 0.0021618
## [1] 0.003311782
## [1] 0.003587925
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 194
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003269959
## [1] 0.001714898
## [1] 0.002802164
## [1] 0.003061433
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 195
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004399184
## [1] 0.002973068
## [1] 0.003812089
## [1] 0.004009402
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 196
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004187221
## [1] 0.004823609
## [1] 0.005514904
## [1] 0.005599064
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 197
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004445114
## [1] 0.003503303
## [1] 0.004348697
## [1] 0.00448566
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 198
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003743431
## [1] 0.001650479
## [1] 0.002571204
## [1] 0.002796467
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 199
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003906257
## [1] 0.001273403
## [1] 0.001489136
## [1] 0.001621695
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 200
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00446325
## [1] 0.003363305
## [1] 0.004424157
## [1] 0.004670021
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 201
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004346634
## [1] 0.003120417
## [1] 0.003964276
## [1] 0.003992099
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 202
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003864149
## [1] 0.001114114
## [1] 0.00116855
## [1] 0.001444552
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 203
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003750185
## [1] 0.00120429
## [1] 0.002050897
## [1] 0.002193483
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 204
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004140854
## [1] 0.002186772
## [1] 0.003273111
## [1] 0.003612446
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 205
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004163882
## [1] 0.002557491
## [1] 0.003534161
## [1] 0.003751071
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 206
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004220175
## [1] 0.001527653
## [1] 0.0009371374
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 207
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004354989
## [1] 0.001492433
## [1] 0.001794803
## [1] 0.002110012
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 208
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004868067
## [1] 0.003300008
## [1] 0.004168526
## [1] 0.004438033
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 209
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004331976
## [1] 0.002388224
## [1] 0.003543298
## [1] 0.003808035
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 210
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004099116
## [1] 0.001586559
## [1] 0.002845268
## [1] 0.00323755
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 211
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003379196
## [1] 0.001575904
## [1] 0.002456929
## [1] 0.002652325
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 212
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00454087
## [1] 0.001759805
## [1] 0.0006201073
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 213
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003693125
## [1] 0.002863735
## [1] 0.003692523
## [1] 0.003749599
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 214
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004527638
## [1] 0.004046729
## [1] 0.004695658
## [1] 0.004684608
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 215
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003589507
## [1] 0.001919757
## [1] 0.00291736
## [1] 0.003105089
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 216
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004571578
## [1] 0.002233296
## [1] 0.003304299
## [1] 0.003599108
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 217
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003664145
## [1] 0.003525523
## [1] 0.004283678
## [1] 0.004395754
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 218
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004325815
## [1] 0.001703399
## [1] 0.002778152
## [1] 0.003030004
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 219
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004440085
## [1] 0.001587271
## [1] 0.002855758
## [1] 0.003276937
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 220
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003671065
## [1] 0.001454409
## [1] 0.0024328
## [1] 0.002541317
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 221
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00342033
## [1] 0.003174821
## [1] 0.003793127
## [1] 0.003889741
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 222
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00403257
## [1] 0.002595059
## [1] 0.003247085
## [1] 0.003289333
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 223
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003973529
## [1] 0.001495904
## [1] 0.002506077
## [1] 0.002794158
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 224
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004338852
## [1] 0.001563618
## [1] 0.002552331
## [1] 0.002752347
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 225
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002901783
## [1] 0.002639209
## [1] 0.003439884
## [1] 0.003352175
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 226
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003345747
## [1] 0.001725865
## [1] 0.002615876
## [1] 0.002784373
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 227
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00499945
## [1] 0.002150274
## [1] 0.003082934
## [1] 0.003473602
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 228
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003968077
## [1] 0.001397027
## [1] 0.002192525
## [1] 0.002562925
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 229
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003918392
## [1] 0.00162353
## [1] 0.002563981
## [1] 0.002790442
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 230
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005928277
## [1] 0.00212974
## [1] 0.000856821
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 231
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003874104
## [1] 0.001214346
## [1] 0.001964328
## [1] 0.002123814
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 232
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003311135
## [1] 0.00230532
## [1] 0.003046812
## [1] 0.003185833
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 233
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00441536
## [1] 0.00160929
## [1] 0.002112427
## [1] 0.002245044
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 234
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004127317
## [1] 0.001887237
## [1] 0.002783429
## [1] 0.002917721
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 235
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003543152
## [1] 0.002909566
## [1] 0.00361333
## [1] 0.003769131
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 236
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004056855
## [1] 0.003486468
## [1] 0.004269388
## [1] 0.004412808
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 237
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004536349
## [1] 0.001722443
## [1] 0.002450391
## [1] 0.002713077
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 238
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003771331
## [1] 0.004143758
## [1] 0.004701704
## [1] 0.004635635
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 239
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004608261
## [1] 0.003115379
## [1] 0.004126264
## [1] 0.004485804
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 240
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004255733
## [1] 0.001542072
## [1] 0.002144812
## [1] 0.002375959
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 241
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004200357
## [1] 0.001512634
## [1] 0.001227948
## [1] 0.001695871
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 242
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002949173
## [1] 0.001731209
## [1] 0.002742532
## [1] 0.002762236
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 243
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004787439
## [1] 0.001930527
## [1] 0.001272228
## [1] 0.001638369
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 244
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004980381
## [1] 0.003925318
## [1] 0.004841371
## [1] 0.005139595
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 245
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004247915
## [1] 0.001382099
## [1] 0.001987771
## [1] 0.002187309
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 246
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004459075
## [1] 0.001623058
## [1] 0.001306152
## [1] 0.001772765
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 247
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00406763
## [1] 0.001723377
## [1] 0.002617841
## [1] 0.002939994
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 248
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004492604
## [1] 0.002449269
## [1] 0.003196526
## [1] 0.003449997
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 249
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004419442
## [1] 0.002562827
## [1] 0.003313741
## [1] 0.003548524
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 250
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003988121
## [1] 0.00211709
## [1] 0.002755819
## [1] 0.002991149
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 251
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003244597
## [1] 0.0012957
## [1] 0.0021699
## [1] 0.002381099
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 252
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00502107
## [1] 0.00204611
## [1] 0.002310589
## [1] 0.002730097
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 253
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003464661
## [1] 0.001991076
## [1] 0.002805132
## [1] 0.002877956
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 254
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004314357
## [1] 0.001460142
## [1] 0.001862191
## [1] 0.002270385
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 255
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00367985
## [1] 0.001643245
## [1] 0.002579861
## [1] 0.002753814
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 256
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003210963
## [1] 0.002427102
## [1] 0.003257102
## [1] 0.003395092
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 257
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004118852
## [1] 0.001773017
## [1] 0.002864606
## [1] 0.003228903
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 258
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005527752
## [1] 0.003314443
## [1] 0.003950316
## [1] 0.004041344
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 259
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004287202
## [1] 0.001891122
## [1] 0.002716749
## [1] 0.002982476
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 260
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004673998
## [1] 0.001892348
## [1] 0.002625916
## [1] 0.002888151
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 261
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004168294
## [1] 0.001273888
## [1] 0.002225951
## [1] 0.002537826
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 262
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003031161
## [1] 0.002880876
## [1] 0.003445256
## [1] 0.003519988
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 263
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003883367
## [1] 0.002208342
## [1] 0.002916742
## [1] 0.003129838
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 264
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003352516
## [1] 0.002730777
## [1] 0.003417238
## [1] 0.003567452
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 265
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003757442
## [1] 0.001284097
## [1] 0.002164876
## [1] 0.002545843
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 266
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004442038
## [1] 0.001847137
## [1] 0.002400638
## [1] 0.002667032
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 267
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003272581
## [1] 0.001480001
## [1] 0.001362368
## [1] 0.00124558
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 268
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003814378
## [1] 0.001615539
## [1] 0.001510669
## [1] 0.001292836
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 269
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003026156
## [1] 0.001559917
## [1] 0.002164865
## [1] 0.001984748
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 270
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002938152
## [1] 0.001660803
## [1] 0.002207232
## [1] 0.001932378
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 271
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003746433
## [1] 0.001799591
## [1] 0.002732836
## [1] 0.002872517
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 272
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005564265
## [1] 0.001404555
## [1] 0.001205323
## [1] 0.001162709
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 273
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003233348
## [1] 0.001375451
## [1] 0.001225191
## [1] 0.001118603
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 274
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00412556
## [1] 0.001459679
## [1] 0.00125666
## [1] 0.001078579
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 275
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00291069
## [1] 0.001534596
## [1] 0.001230036
## [1] 0.00138191
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 276
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00671091
## [1] 0.001864932
## [1] 0.0009593467
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 277
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002580566
## [1] 0.002555766
## [1] 0.003064051
## [1] 0.002923599
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 278
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00596959
## [1] 0.001383875
## [1] 0.001078839
## [1] 0.0009673703
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 279
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003615575
## [1] 0.001373231
## [1] 0.001753189
## [1] 0.001899357
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 280
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006242491
## [1] 0.001511329
## [1] 0.001186086
## [1] 0.001027055
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 281
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00265254
## [1] 0.002224042
## [1] 0.0026619
## [1] 0.002188346
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 282
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002114022
## [1] 0.002476136
## [1] 0.002813103
## [1] 0.002341702
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 283
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003384068
## [1] 0.00161357
## [1] 0.00141189
## [1] 0.001238619
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 284
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003466996
## [1] 0.001625684
## [1] 0.002263933
## [1] 0.002027927
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 285
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002754151
## [1] 0.001621992
## [1] 0.002193352
## [1] 0.001990059
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 286
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003338995
## [1] 0.001443685
## [1] 0.001874134
## [1] 0.002009198
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 287
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002821964
## [1] 0.001689271
## [1] 0.00208245
## [1] 0.00179023
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 288
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003683489
## [1] 0.001331987
## [1] 0.001322764
## [1] 0.001414944
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 289
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002974181
## [1] 0.001601752
## [1] 0.001368108
## [1] 0.001383979
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 290
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002892473
## [1] 0.001540088
## [1] 0.001619831
## [1] 0.001545348
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 291
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005099709
## [1] 0.00139563
## [1] 0.001196148
## [1] 0.001347324
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 292
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003091912
## [1] 0.001451347
## [1] 0.001733369
## [1] 0.001613475
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 293
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003551036
## [1] 0.001354391
## [1] 0.00192833
## [1] 0.002164806
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 294
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003043198
## [1] 0.002535579
## [1] 0.00305673
## [1] 0.002542663
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 295
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004426729
## [1] 0.0013805
## [1] 0.001300059
## [1] 0.001119156
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 296
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002694653
## [1] 0.00178813
## [1] 0.00304142
## [1] 0.002970353
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 297
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002611157
## [1] 0.001612457
## [1] 0.001493176
## [1] 0.001327268
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 298
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004651315
## [1] 0.001477726
## [1] 0.001324661
## [1] 0.001499917
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 299
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007388787
## [1] 0.002388588
## [1] 0.001062996
## [1] 0.001073934
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 300
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00345358
## [1] 0.001491473
## [1] 0.002376554
## [1] 0.002395371
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 301
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003779421
## [1] 0.001433018
## [1] 0.001160256
## [1] 0.001023758
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 302
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00387591
## [1] 0.001431328
## [1] 0.001248078
## [1] 0.001095055
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 303
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002354229
## [1] 0.001587228
## [1] 0.00158072
## [1] 0.001185288
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 304
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004005453
## [1] 0.001271644
## [1] 0.001223675
## [1] 0.001061459
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 305
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003005433
## [1] 0.002555327
## [1] 0.003254381
## [1] 0.002947629
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 306
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006496011
## [1] 0.001403513
## [1] 0.001304138
## [1] 0.001128009
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 307
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003606967
## [1] 0.001425803
## [1] 0.002269441
## [1] 0.002346494
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 308
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002788548
## [1] 0.001424366
## [1] 0.001574762
## [1] 0.001184224
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 309
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004723298
## [1] 0.001205665
## [1] 0.001157074
## [1] 0.001180721
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 310
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004972466
## [1] 0.001032848
## [1] 0.00102058
## [1] 0.000956546
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 311
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003562327
## [1] 0.001087013
## [1] 0.001112406
## [1] 0.00132417
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 312
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004968534
## [1] 0.0016351
## [1] 0.000933658
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 313
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003796428
## [1] 0.001072735
## [1] 0.001799646
## [1] 0.002008036
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 314
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003857301
## [1] 0.00118075
## [1] 0.001981689
## [1] 0.002107299
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 315
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003731313
## [1] 0.001149002
## [1] 0.001348019
## [1] 0.001656109
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 316
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004444856
## [1] 0.001723071
## [1] 0.001643431
## [1] 0.00200646
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 317
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004862466
## [1] 0.001920042
## [1] 0.0009954002
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 318
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003818516
## [1] 0.001714108
## [1] 0.002487796
## [1] 0.002578841
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 319
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004146882
## [1] 0.001391105
## [1] 0.00110637
## [1] 0.00125253
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 320
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003075779
## [1] 0.0015004
## [1] 0.002156659
## [1] 0.00229608
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 321
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00458257
## [1] 0.001231081
## [1] 0.0009538959
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 322
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005279731
## [1] 0.001782109
## [1] 0.0008353057
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 323
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003840115
## [1] 0.001093338
## [1] 0.001118597
## [1] 0.001194707
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 324
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003681496
## [1] 0.00105581
## [1] 0.001109227
## [1] 0.001458774
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 325
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004140589
## [1] 0.001105659
## [1] 0.001092296
## [1] 0.0009780408
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 326
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003209848
## [1] 0.001116826
## [1] 0.001528447
## [1] 0.001649703
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 327
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003886437
## [1] 0.001456206
## [1] 0.002022796
## [1] 0.00211254
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 328
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003757112
## [1] 0.001431022
## [1] 0.001829305
## [1] 0.001813458
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 329
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003669607
## [1] 0.001406633
## [1] 0.001556883
## [1] 0.001733067
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 330
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003734937
## [1] 0.001342422
## [1] 0.002148305
## [1] 0.002239309
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 331
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003645217
## [1] 0.001423323
## [1] 0.001356038
## [1] 0.001278576
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 332
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003530944
## [1] 0.001609394
## [1] 0.001355474
## [1] 0.001185824
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 333
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004196098
## [1] 0.001727061
## [1] 0.002423354
## [1] 0.002367512
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 334
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003506657
## [1] 0.002407806
## [1] 0.003070104
## [1] 0.00288584
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 335
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00376865
## [1] 0.001613142
## [1] 0.001521434
## [1] 0.001439039
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 336
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004498999
## [1] 0.001577382
## [1] 0.002436638
## [1] 0.00250626
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 337
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003466314
## [1] 0.001556705
## [1] 0.001762848
## [1] 0.001877243
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 338
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003165172
## [1] 0.001449668
## [1] 0.001842265
## [1] 0.00187385
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 339
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003485013
## [1] 0.001373326
## [1] 0.001319255
## [1] 0.001481672
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 340
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0034658
## [1] 0.001387039
## [1] 0.002035432
## [1] 0.002250127
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 341
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003020254
## [1] 0.001684269
## [1] 0.001983474
## [1] 0.001710608
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 342
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002967454
## [1] 0.001505939
## [1] 0.002349659
## [1] 0.002347197
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 343
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004594546
## [1] 0.001290834
## [1] 0.001179419
## [1] 0.0009994061
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 344
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003062351
## [1] 0.001273327
## [1] 0.001763569
## [1] 0.001803734
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 345
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003164855
## [1] 0.00197119
## [1] 0.00273652
## [1] 0.002514359
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 346
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003482521
## [1] 0.002040083
## [1] 0.002701058
## [1] 0.002551202
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 347
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002048468
## [1] 0.002215297
## [1] 0.002686745
## [1] 0.00266197
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 348
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002031614
## [1] 0.001728927
## [1] 0.001847409
## [1] 0.001559994
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 349
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00274341
## [1] 0.001719966
## [1] 0.001776813
## [1] 0.001790128
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 350
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002094383
## [1] 0.001577357
## [1] 0.002033332
## [1] 0.002009475
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 351
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00268111
## [1] 0.001814664
## [1] 0.002570851
## [1] 0.002657114
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 352
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002639251
## [1] 0.001795024
## [1] 0.002336047
## [1] 0.002265932
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 353
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00185581
## [1] 0.003538912
## [1] 0.003782186
## [1] 0.003400296
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 354
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002276897
## [1] 0.002678697
## [1] 0.00309633
## [1] 0.002576198
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 355
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003645356
## [1] 0.003649711
## [1] 0.004135724
## [1] 0.003758281
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 356
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002547255
## [1] 0.003029644
## [1] 0.00360824
## [1] 0.003422978
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 357
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002710965
## [1] 0.003216663
## [1] 0.003845505
## [1] 0.00373382
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 358
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002268893
## [1] 0.003218912
## [1] 0.003816851
## [1] 0.003660028
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 359
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003507031
## [1] 0.002441438
## [1] 0.002970615
## [1] 0.002787731
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 360
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003439097
## [1] 0.001687912
## [1] 0.001725301
## [1] 0.001650515
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 361
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003571297
## [1] 0.002082437
## [1] 0.003032762
## [1] 0.003152755
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 362
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003242976
## [1] 0.001689903
## [1] 0.002603877
## [1] 0.002676094
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 363
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003766381
## [1] 0.003067258
## [1] 0.003758236
## [1] 0.003801181
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 364
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003728647
## [1] 0.002208057
## [1] 0.0030224
## [1] 0.003019982
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 365
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002672735
## [1] 0.00242128
## [1] 0.002932137
## [1] 0.002940061
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 366
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004088338
## [1] 0.002858299
## [1] 0.003675338
## [1] 0.003710179
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 367
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004350275
## [1] 0.003210226
## [1] 0.003963989
## [1] 0.00395053
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 368
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004046512
## [1] 0.002154643
## [1] 0.003092779
## [1] 0.003266773
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 369
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003832704
## [1] 0.003683493
## [1] 0.004574084
## [1] 0.004708998
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 370
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003486984
## [1] 0.002887832
## [1] 0.003607361
## [1] 0.003503459
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 371
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002985638
## [1] 0.00246737
## [1] 0.00303464
## [1] 0.002977655
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 372
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003043257
## [1] 0.002294238
## [1] 0.003070196
## [1] 0.003131619
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 373
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003465811
## [1] 0.002863745
## [1] 0.003514036
## [1] 0.003287863
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 374
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00274197
## [1] 0.003414076
## [1] 0.004076839
## [1] 0.004040382
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 375
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003157827
## [1] 0.001435316
## [1] 0.001713859
## [1] 0.001867855
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 376
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002109525
## [1] 0.001558863
## [1] 0.001566625
## [1] 0.001697922
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 377
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003641764
## [1] 0.001551443
## [1] 0.002284809
## [1] 0.002380606
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 378
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002932951
## [1] 0.003096895
## [1] 0.00362268
## [1] 0.003552491
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 379
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003243551
## [1] 0.002820201
## [1] 0.003372036
## [1] 0.003241678
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 380
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004122299
## [1] 0.002060818
## [1] 0.003135588
## [1] 0.003164996
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 381
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002318646
## [1] 0.001782107
## [1] 0.002578828
## [1] 0.002623859
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 382
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003006285
## [1] 0.003507268
## [1] 0.004362586
## [1] 0.004554704
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 383
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002533117
## [1] 0.001399324
## [1] 0.001867133
## [1] 0.001776749
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 384
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002577229
## [1] 0.002118972
## [1] 0.002851791
## [1] 0.002960102
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 385
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00344416
## [1] 0.002178815
## [1] 0.003048648
## [1] 0.003208457
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 386
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003728194
## [1] 0.001622375
## [1] 0.001736769
## [1] 0.001530449
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 387
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002139283
## [1] 0.001753924
## [1] 0.002560569
## [1] 0.002565973
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 388
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002383736
## [1] 0.002243755
## [1] 0.00304898
## [1] 0.003228723
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 389
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003482621
## [1] 0.001954967
## [1] 0.002922134
## [1] 0.00298707
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 390
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002002563
## [1] 0.001481209
## [1] 0.002151547
## [1] 0.002245863
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 391
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00266621
## [1] 0.003024626
## [1] 0.003551521
## [1] 0.003557806
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 392
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003637341
## [1] 0.001625613
## [1] 0.002698155
## [1] 0.002771033
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 393
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003171681
## [1] 0.001497309
## [1] 0.001375147
## [1] 0.001184899
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 394
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003043693
## [1] 0.002316958
## [1] 0.002962263
## [1] 0.003073954
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 395
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002733198
## [1] 0.001993262
## [1] 0.002776924
## [1] 0.002930682
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 396
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00428364
## [1] 0.003692767
## [1] 0.004394612
## [1] 0.004675484
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 397
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003282919
## [1] 0.0033608
## [1] 0.003894465
## [1] 0.004028997
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 398
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002695027
## [1] 0.001490639
## [1] 0.002322572
## [1] 0.002591427
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 399
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003759416
## [1] 0.001518698
## [1] 0.002548559
## [1] 0.002781566
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 400
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0014974
## [1] 0.001026543
## [1] 0.001115966
## [1] 0.001222516
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 401
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002665957
## [1] 0.001681125
## [1] 0.002239159
## [1] 0.002368164
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 402
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00400256
## [1] 0.003055362
## [1] 0.003740815
## [1] 0.003905095
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 403
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004703487
## [1] 0.00287596
## [1] 0.003705487
## [1] 0.003878288
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 404
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004400285
## [1] 0.00148003
## [1] 0.001489767
## [1] 0.001851124
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 405
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003978367
## [1] 0.001939309
## [1] 0.002917716
## [1] 0.003080422
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 406
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003353116
## [1] 0.001386009
## [1] 0.001596208
## [1] 0.001885392
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 407
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002480609
## [1] 0.001937416
## [1] 0.002711144
## [1] 0.00290429
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 408
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003812124
## [1] 0.0016801
## [1] 0.002825062
## [1] 0.003071082
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 409
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00436289
## [1] 0.003252585
## [1] 0.004263802
## [1] 0.004486485
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 410
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002346176
## [1] 0.003206894
## [1] 0.003630288
## [1] 0.003736333
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 411
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004410438
## [1] 0.001562058
## [1] 0.001925876
## [1] 0.002251955
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 412
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003833374
## [1] 0.002752283
## [1] 0.003660126
## [1] 0.003770777
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 413
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004360448
## [1] 0.002484744
## [1] 0.003437583
## [1] 0.003680479
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 414
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002191753
## [1] 0.002381718
## [1] 0.003161837
## [1] 0.003208208
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 415
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0009898895
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 416
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001815393
## [1] 0.002879661
## [1] 0.00348555
## [1] 0.003410473
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 417
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004130476
## [1] 0.001525508
## [1] 0.001763171
## [1] 0.00220156
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 418
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004124445
## [1] 0.002868171
## [1] 0.004022905
## [1] 0.004376598
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 419
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002519332
## [1] 0.003261702
## [1] 0.003805709
## [1] 0.003829444
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 420
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002500195
## [1] 0.001629003
## [1] 0.002580985
## [1] 0.002921144
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 421
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002779667
## [1] 0.002377521
## [1] 0.003173009
## [1] 0.003347698
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 422
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003334903
## [1] 0.0024947
## [1] 0.003340549
## [1] 0.003451699
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 423
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003740841
## [1] 0.003024325
## [1] 0.003576623
## [1] 0.003745989
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 424
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002007273
## [1] 0.002135306
## [1] 0.002603125
## [1] 0.0027133
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 425
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003307297
## [1] 0.00497415
## [1] 0.005410346
## [1] 0.005194341
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 426
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003725755
## [1] 0.002217177
## [1] 0.003163556
## [1] 0.003408586
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 427
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004448711
## [1] 0.003822296
## [1] 0.004734067
## [1] 0.004958272
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 428
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003137127
## [1] 0.001755255
## [1] 0.002598787
## [1] 0.002543024
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 429
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003441298
## [1] 0.003298076
## [1] 0.003689642
## [1] 0.003778162
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 430
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003837805
## [1] 0.002968363
## [1] 0.003826063
## [1] 0.004204339
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 431
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004661996
## [1] 0.002532147
## [1] 0.00360325
## [1] 0.003930156
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 432
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002361066
## [1] 0.002289926
## [1] 0.003098853
## [1] 0.003336119
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 433
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004286909
## [1] 0.004201603
## [1] 0.005301425
## [1] 0.005542011
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 434
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002366883
## [1] 0.002703042
## [1] 0.003189564
## [1] 0.003000768
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 435
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004425718
## [1] 0.00296142
## [1] 0.003933977
## [1] 0.004308805
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 436
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001670841
## [1] 0.002318419
## [1] 0.002698081
## [1] 0.002760677
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 437
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004275235
## [1] 0.001559015
## [1] 0.000611572
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 438
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003553212
## [1] 0.001412135
## [1] 0.001473465
## [1] 0.00171533
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 439
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001082099
## [1] 0.001420602
## [1] 0.001830782
## [1] 0.001823838
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 440
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.000784151
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 441
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004264386
## [1] 0.004218916
## [1] 0.005153252
## [1] 0.005328188
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 442
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0008109698
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 443
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002601169
## [1] 0.002759995
## [1] 0.003492475
## [1] 0.003617761
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 444
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00390131
## [1] 0.003607701
## [1] 0.00440204
## [1] 0.004491978
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 445
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0014396
## [1] 0.002344238
## [1] 0.002864816
## [1] 0.003039919
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 446
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002420322
## [1] 0.001939512
## [1] 0.002826339
## [1] 0.003021541
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 447
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004070252
## [1] 0.001360256
## [1] 0.00141274
## [1] 0.001745231
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 448
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003581036
## [1] 0.003101441
## [1] 0.003662917
## [1] 0.003729193
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 449
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004113002
## [1] 0.003375746
## [1] 0.004115582
## [1] 0.00436177
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 450
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003582055
## [1] 0.002471259
## [1] 0.003081597
## [1] 0.003219164
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 451
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004727792
## [1] 0.001844294
## [1] 0.002228257
## [1] 0.002375593
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 452
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004131542
## [1] 0.001418048
## [1] 0.001779633
## [1] 0.00195128
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 453
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004594861
## [1] 0.001723441
## [1] 0.001075128
## [1] 0.001416034
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 454
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004243596
## [1] 0.001916898
## [1] 0.002501434
## [1] 0.002346568
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 455
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003927884
## [1] 0.001839265
## [1] 0.002840285
## [1] 0.002854598
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 456
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00400328
## [1] 0.003027782
## [1] 0.00361858
## [1] 0.003500886
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 457
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005870842
## [1] 0.001383394
## [1] 0.0009740405
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 458
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004161844
## [1] 0.001384978
## [1] 0.001152854
## [1] 0.001303673
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 459
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004365635
## [1] 0.001637749
## [1] 0.002415419
## [1] 0.002513319
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 460
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004568206
## [1] 0.001688223
## [1] 0.001844771
## [1] 0.002169832
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 461
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004040195
## [1] 0.002394089
## [1] 0.003231061
## [1] 0.003148067
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 462
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004321434
## [1] 0.001477669
## [1] 0.001141606
## [1] 0.00143759
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 463
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004615503
## [1] 0.001857407
## [1] 0.002457643
## [1] 0.002669167
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 464
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003858938
## [1] 0.001369567
## [1] 0.001821454
## [1] 0.002020011
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 465
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004567113
## [1] 0.001673548
## [1] 0.001133522
## [1] 0.001255035
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 466
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004948355
## [1] 0.002056405
## [1] 0.001827118
## [1] 0.002123052
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 467
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004498426
## [1] 0.001630227
## [1] 0.001487076
## [1] 0.001832085
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 468
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004355635
## [1] 0.001597394
## [1] 0.002655648
## [1] 0.002640389
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 469
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004344207
## [1] 0.001700172
## [1] 0.002821214
## [1] 0.002887327
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 470
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004557141
## [1] 0.002682466
## [1] 0.003624156
## [1] 0.003549989
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 471
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004815789
## [1] 0.002002402
## [1] 0.00236428
## [1] 0.002557365
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 472
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004693601
## [1] 0.001327589
## [1] 0.001187051
## [1] 0.001238074
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 473
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004025425
## [1] 0.002337979
## [1] 0.003177565
## [1] 0.003152805
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 474
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0042345
## [1] 0.001441769
## [1] 0.001058151
## [1] 0.001007074
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 475
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004447411
## [1] 0.003752678
## [1] 0.004463395
## [1] 0.004305607
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 476
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.008012604
## [1] 0.002867652
## [1] 0.0008441319
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 477
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.01056392
## [1] 0.003698594
## [1] 0.001230149
## [1] 0.0006526983
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 478
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006485516
## [1] 0.001456922
## [1] 0.0009227285
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 479
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.009487619
## [1] 0.003040236
## [1] 0.001110052
## [1] 0.00070651
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 480
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.009339607
## [1] 0.003907311
## [1] 0.002195302
## [1] 0.001725259
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 481
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005224103
## [1] 0.002071877
## [1] 0.001744266
## [1] 0.002059815
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 482
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005237509
## [1] 0.002077478
## [1] 0.00207462
## [1] 0.002345634
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 483
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004672166
## [1] 0.001750289
## [1] 0.002239718
## [1] 0.002342426
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 484
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004438404
## [1] 0.00166316
## [1] 0.002066
## [1] 0.002263665
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 485
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.007190501
## [1] 0.003402772
## [1] 0.001981612
## [1] 0.002287299
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 486
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001266725
## [1] 0.003167707
## [1] 0.003092859
## [1] 0.0021129
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 487
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001979418
## [1] 0.005272862
## [1] 0.005455865
## [1] 0.004610392
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 488
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003581675
## [1] 0.0009086231
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 489
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00339406
## [1] 0.001063142
## [1] 0.001881406
## [1] 0.001699753
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 490
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002654635
## [1] 0.001720343
## [1] 0.002830817
## [1] 0.002729854
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 491
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004204856
## [1] 0.0009157328
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 492
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003049839
## [1] 0.001140245
## [1] 0.001907873
## [1] 0.001536073
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 493
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002320979
## [1] 0.001915167
## [1] 0.002779586
## [1] 0.002503502
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 494
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001305189
## [1] 0.002969148
## [1] 0.002961251
## [1] 0.00200907
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 495
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004455034
## [1] 0.0009017618
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 496
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003133698
## [1] 0.001656013
## [1] 0.002818886
## [1] 0.002817676
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 497
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003379454
## [1] 0.002669651
## [1] 0.003553439
## [1] 0.003404562
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 498
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005463625
## [1] 0.001091096
## [1] 0.001101846
## [1] 0.0009867199
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 499
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004671456
## [1] 0.002021282
## [1] 0.00166729
## [1] 0.002108438
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 500
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005229675
## [1] 0.002199003
## [1] 0.001519566
## [1] 0.002224384
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 501
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004412589
## [1] 0.001842823
## [1] 0.002473304
## [1] 0.002870857
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 502
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005166842
## [1] 0.001119346
## [1] 0.001161917
## [1] 0.001625063
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 503
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004103174
## [1] 0.001553467
## [1] 0.001786394
## [1] 0.002136875
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 504
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005803069
## [1] 0.001843526
## [1] 0.001085972
## [1] 0.00165987
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 505
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004422512
## [1] 0.00186814
## [1] 0.002392563
## [1] 0.00288891
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 506
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.01875432
## [1] 0.01134179
## [1] 0.007976834
## [1] 0.006251892
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 507
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005231642
## [1] 0.002640797
## [1] 0.004561799
## [1] 0.00535209
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 508
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.01069722
## [1] 0.004105697
## [1] 0.001521292
## [1] 0.0007634926
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 509
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003679975
## [1] 0.00252503
## [1] 0.003063871
## [1] 0.003951733
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 510
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001420577
## [1] 0.002968258
## [1] 0.00210513
## [1] 0.001313745
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 511
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002775557
## [1] 0.001461895
## [1] 0.001537284
## [1] 0.001455171
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 512
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005153617
## [1] 0.003452465
## [1] 0.003444178
## [1] 0.003847647
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 513
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002559091
## [1] 0.002063615
## [1] 0.002324252
## [1] 0.001807746
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 514
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005323323
## [1] 0.00402323
## [1] 0.004486601
## [1] 0.004911035
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 515
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001292748
## [1] 0.001355773
## [1] 0.001503572
## [1] 0.001484863
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 516
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0048332
## [1] 0.00308168
## [1] 0.002791429
## [1] 0.002868919
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 517
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003491111
## [1] 0.001977197
## [1] 0.0018766
## [1] 0.002075102
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 518
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005359524
## [1] 0.002722447
## [1] 0.002430981
## [1] 0.002712783
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 519
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002319844
## [1] 0.001635475
## [1] 0.001642707
## [1] 0.002015956
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 520
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002184724
## [1] 0.001576033
## [1] 0.001667243
## [1] 0.001582371
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 521
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003942681
## [1] 0.002611548
## [1] 0.002359133
## [1] 0.002333333
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 522
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004070011
## [1] 0.001479433
## [1] 0.001607853
## [1] 0.001877762
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 523
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006847198
## [1] 0.0024024
## [1] 0.001284316
## [1] 0.00114481
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 524
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006160567
## [1] 0.00178464
## [1] 0.001091311
## [1] 0.000992835
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 525
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003675536
## [1] 0.001202325
## [1] 0.001401117
## [1] 0.001770069
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 526
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005491278
## [1] 0.001297469
## [1] 0.001248526
## [1] 0.001133969
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 527
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.0009597291
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 528
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005785998
## [1] 0.002116727
## [1] 0.0007223796
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 529
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.006605343
## [1] 0.004142326
## [1] 0.003683055
## [1] 0.003753593
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 530
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004465868
## [1] 0.001007271
## [1] 0.00120331
## [1] 0.00121629
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 531
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001203342
## [1] 0.001280938
## [1] 0.001361344
## [1] 0.001293763
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 532
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002209166
## [1] 0.001483483
## [1] 0.001530571
## [1] 0.001394337
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 533
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004984648
## [1] 0.002334127
## [1] 0.002546833
## [1] 0.003279834
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 534
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001656887
## [1] 0.001439694
## [1] 0.001482359
## [1] 0.001362296
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 535
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005886423
## [1] 0.002012803
## [1] 0.001319791
## [1] 0.001529018
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 536
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004014744
## [1] 0.0009506922
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 537
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.005219194
## [1] 0.002618662
## [1] 0.002789129
## [1] 0.003492718
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 538
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001661055
## [1] 0.001447109
## [1] 0.001465851
## [1] 0.001381868
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 539
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002312138
## [1] 0.001470543
## [1] 0.001541999
## [1] 0.001442173
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 540
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.002668233
## [1] 0.001504777
## [1] 0.001532107
## [1] 0.002175353
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 541
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.000967094
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 542
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001439247
## [1] 0.001730975
## [1] 0.001701303
## [1] 0.002342692
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 543
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003008895
## [1] 0.001485359
## [1] 0.001547939
## [1] 0.001474236
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 544
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003792766
## [1] 0.002028236
## [1] 0.002290341
## [1] 0.003005674
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 545
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003315612
## [1] 0.001499638
## [1] 0.001549775
## [1] 0.001835902
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 546
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.001484957
## [1] 0.001763264
## [1] 0.001690037
## [1] 0.001550756
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 547
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003167052
## [1] 0.001480889
## [1] 0.001521513
## [1] 0.002175147
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 548
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00371207
## [1] 0.002175611
## [1] 0.002453219
## [1] 0.003226956
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 549
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.00144899
## [1] 0.001575316
## [1] 0.001577266
## [1] 0.001456822
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 550
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.004484488
## [1] 0.002259194
## [1] 0.002253491
## [1] 0.002752854
## [1] "Done"
## [1] "Start normalising input probes"
## ii= 551
## [1] "Fitting EM beta mixture to input probes"
## [1] Inf
## [1] 0.003812476
## [1] 0.001341613
## [1] 0.001417182
## [1] 0.001338861
## [1] "Done"
## [1] "Start normalising input probes"
# calibrate data from different tissue types separately
# normCali_BMof8TissueTypes <- CalibrateFUN2(GoldStaStudy = "GSE74738") 

saveRDS(normCali_BMof9TissueTypes_CaliTogether,
    file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/normCali_BMof9TissueTypes_CaliTogether.rds")

3. MDS plot using all data

A) plot 9 separate plots for 9 different tissue types.

Function plotMDSFUN

Tissue argument in plotMDSFUN function could be: Placenta, Amnion, Chorion, Decidua, Maternal whole blood, placental mesenchyme, placental trophoblast, umbilical cord, Umbilical cord blood.

# phenoData: GEO_phenotypes, meta data for all samples
# Array: "450k" or "EPIC"

plotMDSFUN <- function(Normal_betaNorm, Tissue, PhenoData, ...){
  registerDoParallel(cores = 10)

  # get meta data
  GEO_phenotypes_Tissue <- PhenoData %>% 
  filter(str_detect(Sample, pattern=paste0("^", Tissue, "$")))
  
  # then get beta values for each tissue type
  Normal_betaNorm_forPlot <- Normal_betaNorm[,colnames(Normal_betaNorm)%in%GEO_phenotypes_Tissue$Sample_name, drop=FALSE]
  
  # plotMDS plots
  if(all(table(GEO_phenotypes_Tissue$Sample_name==colnames(Normal_betaNorm_forPlot)))){
      label <- GEO_phenotypes_Tissue$Trimester
  }else{
    print("Rownames of beta matrix were not matched with phenoData$Sample_name")
  }

  if(ncol(Normal_betaNorm_forPlot)>=3){
  par(mfrow=c(1,1), ...)
  plotMDS(Normal_betaNorm_forPlot, top=nrow(Normal_betaNorm_forPlot), 
          main=Tissue, labels= label, gene.selection="common") 
  }
  # labels= label, col= pal[factor(label)],

  # plot density plot anagin with other 96 samples 
  par(mfrow=c(1,1), cex=0.8, ...)
  densityPlot(Normal_betaNorm_forPlot, sampGroups = label, 
              main=Tissue, xlab = "Normalised Beta values")

}# end function

Use function plotMDSFUN, plot 9 separate plots for 9 different tissue types.

TissueBMvalInfo <- tibble(
  TissueTypes = c("Placenta", "Amnion", "Chorion", "Decidua",
                "Maternal whole blood",
                "placental mesenchyme", 
                "placental trophoblast", "umbilical cord", "Umbilical cord blood")
)


# use plotMDSFUN function
for(i in TissueBMvalInfo$TissueTypes){
  
  plotMDSFUN(Normal_betaNorm = normCali_BMof9TissueTypes_CaliTogether$Beta, 
             Tissue = i, 
             PhenoData = normCali_BMof9TissueTypes_CaliTogether$BetaPhenoData)
}

B) plot all values (551 samples) in one MDS plot

plotAll function

# value-- Beta or M
# TissueBMvalInfo -- a tibble containing BM names

plotAll <- function(BMvalue, GEO_phenotypes_joinedSamples){
  registerDoParallel(cores = 10)
  
  #plotMDS plots
  ## phenodata for these samples
  GEO_phenotypes_551 <- GEO_phenotypes_joinedSamples[match(colnames(BMvalue),
                                                               GEO_phenotypes_joinedSamples$Sample_name),]
  ## check names all in same order or not
  table(colnames(BMvalue)==GEO_phenotypes_551$Sample_name)

  ## plot MDS plot
  par(mfrow=c(1,1))
  MDS_norm551 <- plotMDS(BMvalue, top=nrow(BMvalue), labels= GEO_phenotypes_551$Sample,
                         gene.selection="common") 

  # plot density plot
  par(mfrow=c(1,1), cex=0.8)
  densityPlot(BMvalue, sampGroups = GEO_phenotypes_551$Sample, xlab = "Normalised Beta values")
  
  # return Join.df_v2, GEO_phenotypes_norm551 and MDS_norm551
  output_List <- list(JoinAll=BMvalue, phenoDataAll=GEO_phenotypes_551, MDSnorm551=MDS_norm551)
  return(output_List)
}

use plotAll function

MDSnormCali551_Beta <- plotAll(BMvalue = normCali_BMof9TissueTypes_CaliTogether$Beta,
                           GEO_phenotypes_joinedSamples = normCali_BMof9TissueTypes_CaliTogether$BetaPhenoData)

MDSnormCali551_M <- plotAll(BMvalue = normCali_BMof9TissueTypes_CaliTogether$M, 
                        GEO_phenotypes_joinedSamples = normCali_BMof9TissueTypes_CaliTogether$BetaPhenoData)

save(MDSnormCali551_Beta, MDSnormCali551_M,
     file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/GEO_joinedSamplesNormalisedCalibrated551_BetaM_MDS.RData")

C) MDS for all 551 samples use ggplot

function for plot MDS with ggplot – ggplotMDS function

library(RColorBrewer)
colorFun <- colorRampPalette(brewer.pal(9, "Set1"))
pal2 <- colorFun(13)

# set up df for ggplot
## check sample orders were the same or not
table(colnames(MDSnormCali551_Beta$JoinAll)==MDSnormCali551_Beta$phenoDataAll$Sample_name)
## 
## TRUE 
##  551
table(colnames(MDSnormCali551_M$JoinAll)==MDSnormCali551_M$phenoDataAll$Sample_name)
## 
## TRUE 
##  551
# ggplotMDS function
## value -- Beta or M
ggplotMDS <- function(MDS_norm551, GEO_phenotypes_norm551, value){
  
  new_plotDF <- data.frame(MDS_norm551$x, 
      MDS_norm551$y,
      GA = GEO_phenotypes_norm551$Gestation,
      FetalSex= GEO_phenotypes_norm551$Fetal_Sex,
      Tissue=str_replace_all(GEO_phenotypes_norm551$Sample, c(
                                        "placental"="Placental",
                                        "umbilical"="Umbilical")),
      Trimester=GEO_phenotypes_norm551$Trimester,
      Study=GEO_phenotypes_norm551$Study,
      Outlier=ifelse(GEO_phenotypes_norm551$Additional_Info%in%"Outlier", "Outlier", "Standard"),
      ArrayType=GEO_phenotypes_norm551$ArrayType
    
  )

  colnames(new_plotDF) <- c("x", "y", "Gestational age", "FetalSex", "Tissue", "Trimester", "Study", "Outlier", "ArrayType")

  # Plot the new dataframe
  ## color to use
  namedPal2 <- pal2 %>% `names<-`(unique(new_plotDF$Tissue))
  TissueShape <- factor(new_plotDF$Tissue)

  MDSplot_norm551 <- new_plotDF %>%
    ggplot(aes(x, y)) + 
    geom_point(aes(shape = Study, col=Trimester), alpha = 1, size = 5)+ 
    # scale_color_manual(values = namedPal2)+
    scale_shape_manual(values=1:length(new_plotDF$Study))+
    labs(x="Dimension 1", y="Dimension 2")+
    theme(text = element_text(size=20))
    # axis.text.x = element_text(angle=90, hjust=1)) 


  # save the MDS plot as pdf:
  pdf(file = paste0("/home/qianhui/DNAme/Process_decidual/figures/MDSplot-Normalised", value, "_joinedGEOsamples551.pdf"), 
    width = 13, height = 7)

  theme_set(theme_bw())
  MDSplot_norm551
  dev.off()

  # save as tiff
  tiff(file = paste0("/home/qianhui/DNAme/Process_decidual/figures/MDSplot-Normalised", value, "_joinedGEOsamples551.tiff"), 
     width = 20,height = 15, units="cm",  res = 300)

  theme_set(theme_bw())
  MDSplot_norm551
  dev.off()
  
  # show the plot
  theme_set(theme_bw())
  MDSplot_norm551 %>% print()
  
  # return new_plotDF
  return(new_plotDF)
}

use ggplotMDS function

# for MDSnormCali551_Beta
AllBetaMDSinfo <- ggplotMDS(MDS_norm551 = MDSnormCali551_Beta$MDSnorm551, 
          GEO_phenotypes_norm551 = MDSnormCali551_Beta$phenoDataAll, 
          value = "Beta")

AllBetaMDSinfo %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(AllBetaMDSinfo$Study))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

# for MDSnormCali551_M
AllMMDSinfo <- ggplotMDS(MDS_norm551 = MDSnormCali551_M$MDSnorm551, 
          GEO_phenotypes_norm551 = MDSnormCali551_M$phenoDataAll, 
          value = "M")

AllMMDSinfo %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(AllMMDSinfo$Study))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

  • all data have been adjust for batch effects. but the batch effects seems still obvious, probably need to use ComBat(sva) to adjust for batch.

4. Use Combat to adjust batch

A) function CombatFUN

# we use the BMIQ normalised data for the following function
NormBMlist <- readRDS(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/NormBMlist.rds")

## the `CombatFUN`
# MMat=NormBMlist$NormMAll
# phenotype=NormBMlist$phenoDataAll

CombatFUN <- function(MMat, phenotype){
  registerDoParallel(cores = 10)
  
  # # df including tissue informations
  # Tissue <- c("Placenta", "Amnion", "Chorion", "Decidua",
  #            "Maternal whole blood", "placental mesenchyme",
  #            "placental trophoblast", "umbilical cord", "Umbilical cord blood")

  # # add all normalised beta values to a list
  # for(tissue in Tissue){
  # # subset the beta values for one tissue type
  # ## one tissue type
  # sampleNamesForOneTissue <- phenotype[phenotype$Sample%in%tissue,]
  # BetaMat_1Tissue <- BetaMat[,colnames(BetaMat)%in%sampleNamesForOneTissue$Sample_name, drop=FALSE]
  # 
  # ## normalise beta value for this tissue type
  # ListToJoin <- list()
  # # names for the list
  # listElements <- c(paste0("normB", "_", str_replace_all(Tissue, " ", "_"), ".df"))
  # 
  # # fill the list with beta values
  # ListToJoin[[listElements]] <- BMIQ(beta = BetaMat_1Tissue) %>% 
  #                               as.data.frame() %>% rownames_to_column(var="Probe")
  # }
  # 
  # # left_join values form all samples
  # Join_allNorm.df <- ListToJoin %>% purrr::reduce(left_join, by = "Probe")
  # # omit na values
  # Join_allNorm.df_v1 <- na.omit(Join_allNorm.df)
  # # as matrix
  # Join_allNorm.df_v2 <- Join_allNorm.df_v1 %>% remove_rownames() %>% 
  # column_to_rownames(var="Probe") %>% as.matrix() # 298179
  
  # phenotype_matched <- phenotype[match(colnames(MMat),
  #                                      phenotype$Sample_name),]
  # 
  # 
  # # add all normalised beta values to a list
  # 
  # for(t in Tissue){
  # # subset the beta values for one tissue type
  # ## one tissue type
  # phenotype_matched_oneTissue <- phenotype_matched[phenotype_matched$Sample%in%t,]
  # MMatOneTissue <- MMat[,colnames(MMat)%in%phenotype_matched_oneTissue$Sample_name,drop=FALSE]
  # 
  # ListToJoin <- list()
  # # names for the list
  # listElements <- c(paste0("CorrectM", "_", str_replace_all(t, " ", "_"), ".df"))
  # phenotype_matched_oneTissue$Trimester[phenotype_matched_oneTissue$Trimester%in%NA] <- "unknown"
  # 
  # if(t=="Placenta"){
  #   
  #   ListToJoin[[listElements]] <- champ.runCombat(beta = MMatOneTissue, 
  #                                        pd = phenotype_matched_oneTissue, 
  #                                        variablename = "Trimester",
  #                                        batchname = "Study", 
  #                                        logitTrans = FALSE) %>%
  #                               as.data.frame() %>% rownames_to_column(var="Probe")}
  # 
  # batch1 <- factor(phenotype_matched_oneTissue$Study)
  # modcombat <- model.matrix(~ 1,
  #                           data = phenotype_matched_oneTissue)
  # 
  # # adjust bach effect for preprocessed mval using Combat function
  # placenta_Mval_combatAdjusted1 <- ComBat(dat = MMatOneTissue, batch = batch1, mod = modcombat, 
  #                                         par.prior = TRUE, prior.plots=TRUE)
  # 
  # # }else{
  # # # fill the list with combat corrected M values
  # # ListToJoin[[listElements]] <- champ.runCombat(beta = MMatOneTissue, 
  # #                                        pd = phenotype_matched_oneTissue, 
  # #                                        variablename = "Sample",
  # #                                        batchname = "Study", 
  # #                                        logitTrans = FALSE) %>%
  # #                               as.data.frame() %>% rownames_to_column(var="Probe")
  # # 
  # # }
  # 
  # }
  # 
  # # left_join values form all samples
  # Join_allCorrectedM.df <- ListToJoin %>% purrr::reduce(left_join, by = "Probe")
  # # omit na values
  # Join_allCorrectedM.df_v1 <- na.omit(Join_allCorrectedM.df)
  # # as matrix
  # Join_allCorrectedM.df_v2 <- Join_allCorrectedM.df_v1 %>% remove_rownames() %>%
  # column_to_rownames(var="Probe") %>% as.matrix() # 298179
  
  phenotype_matched <- phenotype[match(colnames(MMat),
                                       phenotype$Sample_name),]
  
  # phenotype_matched$group <- phenotype_matched$Sample
  # phenotype_matched$group[phenotype_matched$Sample%in%"Placenta"] <- paste0("Placenta",                                                     phenotype_matched$Trimester[phenotype_matched$Sample%in%"Placenta"])

  # ## use Combat to correct batch effects between studies
  # MMat_batchCorrected <- champ.runCombat(beta = MMat, 
  #                                        pd = phenotype_matched, 
  #                                        variablename = "group",
  #                                        batchname = "Study", 
  #                                        logitTrans = FALSE)
  
  ## use Combat from csv package
  batch1 <- factor(phenotype_matched$Study)
  Samples <- factor(phenotype_matched$Sample)
  trimester <- factor(phenotype_matched$Trimester)
  Outlier <- factor(ifelse(phenotype_matched$Additional_Info%in%"Outlier", "Outlier", "Standard"))
  
  modcombat <- model.matrix(~ Samples+trimester+Outlier)

  MMat_batchCorrected <- ComBat(dat = MMat[,colnames(MMat)%in%phenotype_matched$Sample_name], 
                                batch = batch1, mod = modcombat, par.prior = TRUE, prior.plots=FALSE)
  
  # return list containing beta and M values
  ## calculate Beta values
  BetaMat_batchCorrected <- 2^MMat_batchCorrected / (1+2^MMat_batchCorrected)

  # return beta and M values
  BM_List_combat <- list(Beta=BetaMat_batchCorrected, 
                         M=MMat_batchCorrected,
                         PhenoData=phenotype_matched)
  return(BM_List_combat)

}

B) use CombatFUN to correct batch

# MDSnormCali551_M modified BMIQ calibrated data
BMall_combat <- CombatFUN(MMat = NormBMlist$NormMAll, 
                          phenotype = NormBMlist$phenoDataAll)
## Found15batches
## Adjusting for12covariate(s) or covariate level(s)
## Standardizing Data across genes
## Fitting L/S model and finding priors
## Finding parametric adjustments
## Adjusting the Data

C) MDS plot using batch corrected data

#plotMDS plots
## phenodata for these samples
## check names are in the same order
table(colnames(BMall_combat$Beta)==BMall_combat$PhenoData$Sample_name)
## 
## TRUE 
##  551
## plot MDS plot
par(mfrow=c(1,1))
MDS_normCorrect551.Beta <- plotMDS(BMall_combat$Beta, top=nrow(BMall_combat$Beta), 
                              labels= BMall_combat$PhenoData$Sample, gene.selection="common") 

par(mfrow=c(1,1))
MDS_normCorrect551.M <- plotMDS(BMall_combat$M, top=nrow(BMall_combat$M), 
                              labels= BMall_combat$PhenoData$Sample, gene.selection="common") 

AllMMDSinfo <- ggplotMDS(MDS_norm551 = MDS_normCorrect551.M, 
          GEO_phenotypes_norm551 = BMall_combat$PhenoData, 
          value = "correctedMv1")

save(BMall_combat, MDS_normCorrect551.Beta, MDS_normCorrect551.M, 
     file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/GEO_joinedSamples_NormBatchCorrect551_BetaM_MDS_OutlierConsidered.RData")

Mplacenta_combat <- BMall_combat$M[,BMall_combat$PhenoData$Sample%in%"Placenta"]
lebels <- BMall_combat$PhenoData[BMall_combat$PhenoData$Sample%in%"Placenta",]

plotMDS(Mplacenta_combat, top=nrow(Mplacenta_combat), labels = lebels$Sample, gene.selection = "common")

D) use ggplot to plot MDS, use ggplotMDS function again

# for MDS_normCorrect551_Beta
AllBetaMDSinfo <- ggplotMDS(MDS_norm551 = MDS_normCorrect551.Beta, 
          GEO_phenotypes_norm551 = BMall_combat$PhenoData, 
          value = "correctedBeta")

AllBetaMDSinfo %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(AllBetaMDSinfo$Study))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

# for MDS_normCorrect551_M
AllMMDSinfo <- ggplotMDS(MDS_norm551 = MDS_normCorrect551.M, 
          GEO_phenotypes_norm551 = BMall_combat$PhenoData, 
          value = "correctedM")

AllMMDSinfo %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(AllMMDSinfo$Study))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

5. 1st and term samples, before and after batch correction

A) Use MDS_norm551.M and MDS_norm551.beta objects in NormBMlist list: batch not corrected

# MDS_norm551.M or NormBMlist$MDS_norm551.M
table(rownames(NormBMlist$MDS_norm551.M$distance.matrix)==NormBMlist$phenoDataAll$Sample_name)
## 
## TRUE 
##  551
MDSinfo_uncorrected <- ggplotMDS(MDS_norm551 = NormBMlist$MDS_norm551.M, 
                                 GEO_phenotypes_norm551 = NormBMlist$phenoDataAll, 
                                 value = "unBatchCorrectedM")

MDSinfo_uncorrected %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_uncorrected$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

# MDS_norm551.Beta or NormBMlist$MDS_norm551.Beta
table(rownames(NormBMlist$MDS_norm551.Beta$distance.matrix)==NormBMlist$phenoDataAll$Sample_name)
## 
## TRUE 
##  551
MDSinfo_uncorrected_beta <- ggplotMDS(MDS_norm551 = NormBMlist$MDS_norm551.Beta, 
                                      GEO_phenotypes_norm551 = NormBMlist$phenoDataAll, 
                                      value = "unBatchCorrectedBeta")

MDSinfo_uncorrected_beta %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_uncorrected_beta$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

# save plots
tiff(file = "/home/qianhui/DNAme/Process_decidual/figures/allSamplesMDS551_notCorrected.tiff",
    width = 20, height = 12, units = "cm", res = 300)
theme_set(theme_bw())
MDSinfo_uncorrected %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_uncorrected$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2
pdf(file = "/home/qianhui/DNAme/Process_decidual/figures/allSamplesMDS551_notCorrected.pdf", 
    width = 13, height = 7)
theme_set(theme_bw())
MDSinfo_uncorrected %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_uncorrected$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2

B) Use quantro to look at global differences between tissue types (all 551 samples)

qtest <- quantro(object = NormBMlist$NormBAll[,NormBMlist$phenoDataAll$Sample%in%c("Placenta","Amnion")], 
                 groupFactor = NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Sample%in%c("Placenta","Amnion"), ]$Sample)
## [quantro] Average medians of the distributions are 
##                         not equal across groups.
## [quantro] Calculating the quantro test statistic.
## [quantro] No permutation testing performed. 
##                          Use B > 0 for permutation testing.
qtest
## quantro: Test for global differences in distributions
##    nGroups:  2 
##    nTotSamples:  495 
##    nSamplesinGroups:  10 485 
##    anovaPval:  0.02096 
##    quantroStat:  40.07735 
##    quantroPvalPerm:  Use B > 0 for permutation testing.
# check difference between outliers and other placenta samples
pd_placenta <- NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Sample%in%c("Placenta"), ]
Outlier <- factor(ifelse(pd_placenta$Additional_Info%in%"Outlier", "Outlier", "Standard"))

qtest_outlier <- quantro(object = NormBMlist$NormBAll[,NormBMlist$phenoDataAll$Sample%in%"Placenta"], 
                 groupFactor = Outlier)
## [quantro] Average medians of the distributions are 
##                         not equal across groups.
## [quantro] Calculating the quantro test statistic.
## [quantro] No permutation testing performed. 
##                          Use B > 0 for permutation testing.
qtest_outlier
## quantro: Test for global differences in distributions
##    nGroups:  2 
##    nTotSamples:  485 
##    nSamplesinGroups:  9 476 
##    anovaPval:  0 
##    quantroStat:  45.9536 
##    quantroPvalPerm:  Use B > 0 for permutation testing.
anova(qtest_outlier)
## Analysis of Variance Table
## 
## Response: objectMedians
##              Df  Sum Sq Mean Sq F value   Pr(>F)    
## groupFactor   1 0.09849 0.09849  46.685 2.52e-11 ***
## Residuals   483 1.01898 0.00211                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Note: we can see from the quantroStat value (40.0351) from qtest that difference between tissue types were larger than difference within groups.

B) No batch corrected: MDS plot for 1st trimester samples and term samples

# check sample (551 samples) order first
table(colnames(NormBMlist$NormBAll)==NormBMlist$phenoDataAll$Sample_name)
## 
## TRUE 
##  551
table(colnames(NormBMlist$NormMAll)==NormBMlist$phenoDataAll$Sample_name)
## 
## TRUE 
##  551
# subset 1st and term samples
Sample_1st <- NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Trimester%in%"First",]
Sample_term <- NormBMlist$phenoDataAll[NormBMlist$phenoDataAll$Trimester%in%"Term",]
# subset 1st and term Beta values
NormBAll_1st <- NormBMlist$NormBAll[, colnames(NormBMlist$NormBAll)%in%Sample_1st$Sample_name]
NormBAll_Term <- NormBMlist$NormBAll[, colnames(NormBMlist$NormBAll)%in%Sample_term$Sample_name]
# subset 1st and term M values
NormMAll_1st <- NormBMlist$NormMAll[, colnames(NormBMlist$NormMAll)%in%Sample_1st$Sample_name]
NormMAll_Term <- NormBMlist$NormMAll[, colnames(NormBMlist$NormMAll)%in%Sample_term$Sample_name]

# plot MDS for 1st and term separatly
## 1st trimester Beta
MDS_NormBAll_1st <- plotMDS(NormBAll_1st, top=nrow(NormBAll_1st), 
                         labels = Sample_1st$Sample,
                         gene.selection = "common")

MDSinfo_NormBAll_1st <- ggplotMDS(MDS_norm551 = MDS_NormBAll_1st, 
                               GEO_phenotypes_norm551 = Sample_1st, 
                               value = "MDS_B_T1_samples")

### use MDS info. and plot with ggplot
MDSinfo_NormBAll_1st %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  scale_shape_manual(values=1:length(MDSinfo_NormBAll_1st$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

## Term Beta
MDS_NormBAll_term <- plotMDS(NormBAll_Term, top=nrow(NormBAll_Term), 
                         labels = Sample_term$Sample,
                         gene.selection = "common")

MDSinfo_NormBAll_term <- ggplotMDS(MDS_norm551 = MDS_NormBAll_term, 
                                   GEO_phenotypes_norm551 = Sample_term, 
                                   value = "MDS_B_term_samples")

### use MDS info. and plot with ggplot
MDSinfo_NormBAll_term %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  scale_shape_manual(values=1:length(MDSinfo_NormBAll_term$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

## 1st trimester M
MDS_NormMAll_1st <- plotMDS(NormMAll_1st, top=nrow(NormMAll_1st), 
                         labels = Sample_1st$Sample,
                         gene.selection = "common")

MDSinfo_NormMAll_1st <- ggplotMDS(MDS_norm551 = MDS_NormMAll_1st, 
                               GEO_phenotypes_norm551 = Sample_1st, 
                               value = "MDS_M_T1_samples")

### use MDS info. and plot with ggplot
MDSinfo_NormMAll_1st %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  scale_shape_manual(values=1:length(MDSinfo_NormMAll_1st$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

## Term M
MDS_NormMAll_term <- plotMDS(NormMAll_Term, top=nrow(NormMAll_Term), 
                         labels = Sample_term$Sample,
                         gene.selection = "common")

MDSinfo_NormMAll_term <- ggplotMDS(MDS_norm551 = MDS_NormMAll_term, 
                                   GEO_phenotypes_norm551 = Sample_term, 
                                   value = "MDS_M_term_samples")

### use MDS info. and plot with ggplot
MDSinfo_NormMAll_term %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  scale_shape_manual(values=1:length(MDSinfo_NormMAll_term$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

C) correct for batch, 1st and term samples

Note: we can’t use combat to correct for batch (for the 1st and term samples), because at least one covariate is confounded with batch! So we need to use sva to regress out batches.

# CombatFun2
CombatFUN2 <- function(MMat, phenotype, trimester){

  registerDoParallel(cores = 10)
  
  phenotype_matched <- phenotype[match(colnames(MMat), phenotype$Sample_name),]
  phenotype_matched$Outlier <- factor(ifelse(phenotype_matched$Additional_Info%in%"Outlier", "Outlier", "Standard"))

  if(trimester=="First"){
  TissueTypes <- c("Placenta", "Decidua",
                "placental mesenchyme", "Maternal whole blood",
                "placental trophoblast")}
  
  if(trimester=="Term"){
  TissueTypes <- c("Placenta", "Amnion", "Chorion", "Decidua", "Umbilical cord blood")
  }
  
  ListToJoin <- list()

    for(i in TissueTypes){
    # subset MMat
    MMat_i <- MMat[, phenotype_matched$Sample%in%i, drop=FALSE]
    # subset phenotype_matched
    phenotype_matched_i <- phenotype_matched[phenotype_matched$Sample%in%i, , drop=FALSE]
    
    # use combat to correct batches
     if(ncol(MMat_i)>1 & length(unique(phenotype_matched_i$Study))>1){
       
       if(length(unique(phenotype_matched_i$Outlier))>1){
         batch <- factor(phenotype_matched_i$Study)
         Outlier <- factor(phenotype_matched_i$Outlier)
         modcombat <- model.matrix(~Outlier, data = phenotype_matched_i)

         MMat_batchCorrected_i <- ComBat(dat = MMat_i,
                                         batch = batch, mod = modcombat, par.prior = TRUE, prior.plots=FALSE)
       }else{
         batch <- factor(phenotype_matched_i$Study)
         modcombat <- model.matrix(~1, data = phenotype_matched_i)

         MMat_batchCorrected_i <- ComBat(dat = MMat_i,
                                         batch = batch, mod = modcombat, par.prior = TRUE, prior.plots=FALSE)
       }
       
     }else{
       MMat_batchCorrected_i <- MMat_i
     } # end if
    
    ListToJoin[[i]] <- MMat_batchCorrected_i %>% as.data.frame() %>% rownames_to_column(var="Probe")
    
    } # end for
  
  # left_join values, to join all samples
  Join_allM_NormCombat.df <- ListToJoin %>% purrr::reduce(left_join, by = "Probe")

  # omit na values
  Join_allM_NormCombat.df_v1 <- na.omit(Join_allM_NormCombat.df)

  # as matrix
  Join_allM_NormCombat.df_v2 <- Join_allM_NormCombat.df_v1 %>% remove_rownames() %>%
  column_to_rownames(var="Probe") %>% as.matrix() 
  
  # return list containing beta and M values
  ## calculate Beta values
  BetaMat_batchCorrected <- 2^Join_allM_NormCombat.df_v2 / (1+2^Join_allM_NormCombat.df_v2)

  # return beta and M values
  phenotype_matched2 <- phenotype[match(colnames(BetaMat_batchCorrected), phenotype$Sample_name),]
  
  Combat_BM_List <- list(Beta = BetaMat_batchCorrected,
                         M = Join_allM_NormCombat.df_v2,
                         PhenoData=phenotype_matched2)
  return(Combat_BM_List)
}


# # Combat correct for batch, use `CombatFUN2`
BM_T1_combat <- CombatFUN2(MMat = NormMAll_1st,
                          phenotype = Sample_1st, 
                          trimester = "First")
## Found3batches
## Adjusting for1covariate(s) or covariate level(s)
## Standardizing Data across genes
## Fitting L/S model and finding priors
## Finding parametric adjustments
## Adjusting the Data
BM_Term_combat <- CombatFUN2(MMat = NormMAll_Term,
                          phenotype = Sample_term, 
                          trimester = "Term")
## Found8batches
## Adjusting for1covariate(s) or covariate level(s)
## Standardizing Data across genes
## Fitting L/S model and finding priors
## Finding parametric adjustments
## Adjusting the Data
save(BM_T1_combat, BM_Term_combat, file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/BM_T1Term_CombatCorrected.rds")

# plot MDS for Combat ajusted data: T1 and term
# plot combat Correct_T1_M
MDS_T1_combat <- plotMDS(BM_T1_combat$M, top=nrow(BM_T1_combat$M), 
              labels = BM_T1_combat$PhenoData$Sample, gene.selection = "common")

MDSinfoT1_combat <- ggplotMDS(MDS_norm551 = MDS_T1_combat, 
                    GEO_phenotypes_norm551 = Sample_1st, 
                    value = "T1_M_CombatremoveBatchEffect")

tiff(file = "/home/qianhui/DNAme/Process_decidual/figures/T1SamplesMDS_CombatCorrected.tiff",
    width = 20, height = 12, units = "cm", res = 300)
theme_set(theme_bw())
MDSinfoT1_combat %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfoT1_combat$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2
# plot Combat Correct_Term_M
Outlier <- factor(ifelse(BM_Term_combat$PhenoData$Additional_Info%in%"Outlier", "Outlier", "Standard"))

MDS_Term_combat <- plotMDS(BM_Term_combat$M, top=nrow(BM_Term_combat$M), 
                           labels = Outlier, gene.selection = "common")

MDSinfoTerm_combat <- ggplotMDS(MDS_norm551 = MDS_Term_combat, 
                    GEO_phenotypes_norm551 = BM_Term_combat$PhenoData, 
                    value = "Term_M_removeBatchEffect")

tiff(file = "/home/qianhui/DNAme/Process_decidual/figures/TermSamplesMDS_CombatCorrected.tiff",
    width = 20, height = 12, units = "cm", res = 300)
theme_set(theme_bw())
MDSinfoTerm_combat %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  scale_color_manual(values = "#00BFC4")+
  scale_shape_manual(values=1:length(MDSinfoTerm_combat$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2
# use sva to regress out batches

svaFUN <- function(SamplePheno, NormM){
  
# factors to consider
Sample <- as.factor(SamplePheno$Sample)
Trimester <- as.factor(SamplePheno$Trimester)
batch <- factor(SamplePheno$Study)

# M values
mval <- NormM

# factor that interested
mod <- model.matrix(~Sample, data = SamplePheno)

# adjustment variables
mod0 <- model.matrix(~1, data = SamplePheno)
sva_M <- sva(mval, mod, mod0)

summary(aov(sva_M$sv ~ batch)) %>% print()

# use removeBetachEffect
design = model.matrix( ~ Sample, data= SamplePheno)
y <- removeBatchEffect(mval, 
                       # batch = NormBMlist$phenoDataAll$Study,
                       # batch2 = NormBMlist$phenoDataAll$ArrayType,
                       # covariates = NormBMlist$phenoDataAl$ControlPC1,
                       covariates = sva_M$sv[,1:3],
                       design=design)

return(list(sva_M=sva_M, mval_sv1Removed=y))

}

svaCorrect_T1_M <- svaFUN(SamplePheno = Sample_1st, NormM = NormMAll_1st)
## Number of significant surrogate variables is:  5 
## Iteration (out of 5 ):1  2  3  4  5   Response 1 :
##             Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch        4 0.65579 0.163948  20.957 9.963e-10 ***
## Residuals   44 0.34421 0.007823                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 2 :
##             Df Sum Sq  Mean Sq F value   Pr(>F)    
## batch        4 0.4409 0.110224  8.6743 2.98e-05 ***
## Residuals   44 0.5591 0.012707                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 3 :
##             Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch        4 0.49511 0.123777  10.787 3.512e-06 ***
## Residuals   44 0.50489 0.011475                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 4 :
##             Df  Sum Sq  Mean Sq F value  Pr(>F)  
## batch        4 0.21199 0.052997  2.9592 0.02998 *
## Residuals   44 0.78801 0.017909                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 5 :
##             Df  Sum Sq  Mean Sq F value Pr(>F)
## batch        4 0.04291 0.010728  0.4932 0.7407
## Residuals   44 0.95709 0.021752
svaCorrect_Term_M <- svaFUN(SamplePheno = Sample_term, NormM = NormMAll_Term)
## Number of significant surrogate variables is:  27 
## Iteration (out of 5 ):1  2  3  4  5   Response 1 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.31886 0.039857  20.422 < 2.2e-16 ***
## Residuals   349 0.68114 0.001952                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 2 :
##              Df Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.4182 0.052274  31.357 < 2.2e-16 ***
## Residuals   349 0.5818 0.001667                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 3 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.18612 0.023265  9.9763 1.574e-12 ***
## Residuals   349 0.81388 0.002332                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 4 :
##              Df Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.4245 0.053063  32.179 < 2.2e-16 ***
## Residuals   349 0.5755 0.001649                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 5 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.30361 0.037951  19.019 < 2.2e-16 ***
## Residuals   349 0.69639 0.001995                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 6 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch         8 0.18041 0.0225515  9.6029 4.869e-12 ***
## Residuals   349 0.81959 0.0023484                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 7 :
##              Df Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.3219 0.040237  20.709 < 2.2e-16 ***
## Residuals   349 0.6781 0.001943                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 8 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch         8 0.24282 0.0303526   13.99 < 2.2e-16 ***
## Residuals   349 0.75718 0.0021696                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 9 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.39314 0.049143  28.262 < 2.2e-16 ***
## Residuals   349 0.60686 0.001739                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 10 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.29021 0.036277  17.837 < 2.2e-16 ***
## Residuals   349 0.70979 0.002034                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 11 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.49283 0.061604  42.391 < 2.2e-16 ***
## Residuals   349 0.50717 0.001453                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 12 :
##              Df  Sum Sq  Mean Sq F value    Pr(>F)    
## batch         8 0.22697 0.028371  12.809 3.513e-16 ***
## Residuals   349 0.77303 0.002215                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 13 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch         8 0.17758 0.0221978  9.4199 8.485e-12 ***
## Residuals   349 0.82242 0.0023565                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 14 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch         8 0.06875 0.0085937  3.2206 0.001513 **
## Residuals   349 0.93125 0.0026683                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 15 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch         8 0.05812 0.0072653   2.692 0.006947 **
## Residuals   349 0.94188 0.0026988                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 16 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.02952 0.0036899  1.3269 0.2287
## Residuals   349 0.97048 0.0027807               
## 
##  Response 17 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch         8 0.10967 0.0137082  5.3734 2.192e-06 ***
## Residuals   349 0.89033 0.0025511                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 18 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch         8 0.07176 0.0089704  3.3727 0.0009664 ***
## Residuals   349 0.92824 0.0026597                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 19 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.02194 0.0027427  0.9787 0.4523
## Residuals   349 0.97806 0.0028025               
## 
##  Response 20 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.03489 0.0043616  1.5772 0.1302
## Residuals   349 0.96511 0.0027654               
## 
##  Response 21 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.01888 0.0023597  0.8394 0.5684
## Residuals   349 0.98112 0.0028112               
## 
##  Response 22 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.03457 0.0043208  1.5619  0.135
## Residuals   349 0.96543 0.0027663               
## 
##  Response 23 :
##              Df Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.0169 0.0021120  0.7498 0.6474
## Residuals   349 0.9831 0.0028169               
## 
##  Response 24 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch         8 0.11464 0.0143297  5.6486 9.357e-07 ***
## Residuals   349 0.88536 0.0025369                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 25 :
##              Df Sum Sq   Mean Sq F value  Pr(>F)  
## batch         8 0.0424 0.0053001  1.9316 0.05446 .
## Residuals   349 0.9576 0.0027438                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 26 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch         8 0.01788 0.0022349  0.7942 0.6081
## Residuals   349 0.98212 0.0028141               
## 
##  Response 27 :
##              Df  Sum Sq   Mean Sq F value  Pr(>F)  
## batch         8 0.04331 0.0054142  1.9751 0.04871 *
## Residuals   349 0.95669 0.0027412                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
save(svaCorrect_T1_M, svaCorrect_Term_M, file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/svaCorrect_T1Term_M_CombatCorrected.rds")

# plot svaCorrect_T1_M
MDS_T1 <- plotMDS(svaCorrect_T1_M$mval_sv1Removed, top=nrow(svaCorrect_T1_M$mval_sv1Removed), 
              labels = Sample_1st$Sample, gene.selection = "common")

MDSinfoT1 <- ggplotMDS(MDS_norm551 = MDS_T1, 
                    GEO_phenotypes_norm551 = Sample_1st, 
                    value = "T1_M_removeBatchEffect")

MDSinfoT1 %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfoT1$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

# plot svaCorrect_Term_M
MDS_Term <- plotMDS(svaCorrect_Term_M$mval_sv1Removed, top=nrow(svaCorrect_Term_M$mval_sv1Removed), 
              labels = Sample_term$Sample, gene.selection = "common")

MDSinfoTerm <- ggplotMDS(MDS_norm551 = MDS_Term, 
                    GEO_phenotypes_norm551 = Sample_term, 
                    value = "Term_M_removeBatchEffect")

MDSinfoTerm %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfoTerm$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

6. regress out batch estimated from control probes (whole data set, 551 smaples)

plot batch corrected data (batch estimated based on control probes)

# load the data of control probes
# Control551_Beta, Control551_M
load(file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/Controls_BM_all551.RData")

## Response MDS$x varies with control PC1:
table(NormBMlist$phenoDataAll$Sample_name==rownames(Control551_M$PCA_control$ind$coord))
## 
## TRUE 
##  551
table(colnames(NormBMlist$NormMAll)==rownames(Control551_M$PCA_control$ind$coord))
## 
## TRUE 
##  551
cor.test(NormBMlist$MDS_norm551.M$x, Control551_M$PCA_control$ind$coord[,1])
## 
##  Pearson's product-moment correlation
## 
## data:  NormBMlist$MDS_norm551.M$x and Control551_M$PCA_control$ind$coord[, 1]
## t = -3.8686, df = 549, p-value = 0.0001226
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.24312317 -0.08046545
## sample estimates:
##       cor 
## -0.162901
## Fit model:
NormBMlist$phenoDataAll$ControlPC1 <- Control551_M$PCA_control$ind$coord[,1]
NormBMlist$phenoDataAll$ControlPC2 <- Control551_M$PCA_control$ind$coord[,2]
# NormBMlist$phenoDataAll$ControlPC3 <- Control551_M$PCA_control$ind$coord[,3]

design1 <- model.matrix(~ControlPC1+ControlPC2, data= NormBMlist$phenoDataAll) #ControlPC1+ControlPC2

## fit lm using limma: 
fit1_limma <- lmFit(NormBMlist$NormMAll, design = design1)
fit2_limma_eBayesAdjusted <- eBayes(fit1_limma)

Residuals <- residuals.MArrayLM(fit2_limma_eBayesAdjusted, NormBMlist$NormMAll)

MDS_residuals <- plotMDS(Residuals, top=nrow(Residuals), 
                         labels = NormBMlist$phenoDataAll$Sample, gene.selection = "common")

MDSinfo_residuals <- ggplotMDS(MDS_norm551 = MDS_residuals, 
                               GEO_phenotypes_norm551 = NormBMlist$phenoDataAll, 
                               value = "MDS_residuals")

save(Residuals, file = "/home/qianhui/DNAme/Process_decidual/RDSfiles/allSamplesResiduals_ControlCorrected_residuals.rds")

## plot MDS with ggplot
MDSinfo_residuals %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_residuals$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

## use `removeBatchEffect`
Sample <- as.factor(NormBMlist$phenoDataAll$Sample)
Trimester <- as.factor(NormBMlist$phenoDataAll$Trimester)
design = model.matrix( ~ Sample+Trimester, data= NormBMlist$phenoDataAll)
y <- removeBatchEffect(NormBMlist$NormMAll, 
                       # batch = NormBMlist$phenoDataAll$Study,
                       # batch2 = NormBMlist$phenoDataAll$ArrayType,
                       # covariates = NormBMlist$phenoDataAl$ControlPC1,
                       covariates = Control551_M$PCA_control$ind$coord[,1:2],
                       design=design)

MDS<- plotMDS(y, top=nrow(y), labels = NormBMlist$phenoDataAll$Sample, gene.selection = "common")

MDSinfo <- ggplotMDS(MDS_norm551 = MDS, 
                    GEO_phenotypes_norm551 = NormBMlist$phenoDataAll, 
                    value = "M_removeBatchEffect")

MDSinfo %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))

## Now residuals are not correlated with age:
# cor.test(lm1$residuals, dat$age)

## Residuals vs original
# plot(lm1$residuals, dat$y)
## ... Now use lm1$residuals instead of dat$y

# save plots
tiff(file = "/home/qianhui/DNAme/Process_decidual/figures/allSamplesMDS551_controlProbeCorrected.tiff",
    width = 20, height = 12, units = "cm", res = 300)
theme_set(theme_bw())
MDSinfo_residuals %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_residuals$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2
pdf(file = "/home/qianhui/DNAme/Process_decidual/figures/allSamplesMDS551_controlProbeCorrected.pdf", 
    width = 13, height = 7)
theme_set(theme_bw())
MDSinfo_residuals %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_residuals$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2

plot batch corrected data (only 1st and term samples)

# 1st trimester & term samples
MDSinfo_residuals_First <- MDSinfo_residuals[MDSinfo_residuals$Trimester%in%"First",]
MDSinfo_residuals_Term <- MDSinfo_residuals[MDSinfo_residuals$Trimester%in%"Term",]


tiff(file = "/home/qianhui/DNAme/Process_decidual/figures/T1SamplesMDS_controlProbeCorrected.tiff",
    width = 20, height = 12, units = "cm", res = 300)
theme_set(theme_bw())
MDSinfo_residuals_First %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo_residuals_First$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2
tiff(file = "/home/qianhui/DNAme/Process_decidual/figures/TermSamplesMDS_controlProbeCorrected.tiff",
    width = 20, height = 12, units = "cm", res = 300)
theme_set(theme_bw())
MDSinfo_residuals_Term %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  scale_color_manual(values = "#00BFC4")+
  scale_shape_manual(values=1:length(MDSinfo_residuals_Term$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))
dev.off()
## png 
##   2

7. SVA to remove batch (whole data set, 551 smaples)

# factors to consider
Sample <- as.factor(NormBMlist$phenoDataAll$Sample)
Trimester <- as.factor(NormBMlist$phenoDataAll$Trimester)
batch <- factor(NormBMlist$phenoDataAll$Study)

# M values
mval <- NormBMlist$NormMAll

# factor that interested
mod <- model.matrix(~Sample+Trimester, data = NormBMlist$phenoDataAll)

# adjustment variables
mod0 <- model.matrix(~1, data = NormBMlist$phenoDataAll)
sva_M <- sva(mval, mod, mod0)
## Number of significant surrogate variables is:  37 
## Iteration (out of 5 ):1  2  3  4  5
summary(aov(sva_M$sv ~ batch))
##  Response 1 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.30135 0.0215251  16.514 < 2.2e-16 ***
## Residuals   536 0.69865 0.0013034                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 2 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.07017 0.0050123  2.8894 0.0003129 ***
## Residuals   536 0.92983 0.0017348                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 3 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.17209 0.0122922  7.9581 1.688e-15 ***
## Residuals   536 0.82791 0.0015446                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 4 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch        14 0.02815 0.0020109  1.1091 0.3463
## Residuals   536 0.97185 0.0018131               
## 
##  Response 5 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.36046 0.0257473  21.579 < 2.2e-16 ***
## Residuals   536 0.63954 0.0011932                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 6 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.08745 0.0062464  3.6689 7.141e-06 ***
## Residuals   536 0.91255 0.0017025                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 7 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.09013 0.0064380  3.7926 3.855e-06 ***
## Residuals   536 0.90987 0.0016975                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 8 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch        14 0.05338 0.0038126  2.1588 0.008317 **
## Residuals   536 0.94662 0.0017661                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 9 :
##              Df Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.1958 0.0139858  9.3216 < 2.2e-16 ***
## Residuals   536 0.8042 0.0015004                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 10 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.16031 0.0114508  7.3094 4.914e-14 ***
## Residuals   536 0.83969 0.0015666                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 11 :
##              Df Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.1356 0.0096855  6.0058 4.399e-11 ***
## Residuals   536 0.8644 0.0016127                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 12 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)  
## batch        14 0.05087 0.0036336   2.052  0.013 *
## Residuals   536 0.94913 0.0017708                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 13 :
##              Df Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.1256 0.0089713  5.4993 6.146e-10 ***
## Residuals   536 0.8744 0.0016313                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 14 :
##              Df  Sum Sq   Mean Sq F value  Pr(>F)    
## batch        14 0.08038 0.0057411  3.3462 3.5e-05 ***
## Residuals   536 0.91962 0.0017157                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 15 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.11982 0.0085585  5.2118 2.734e-09 ***
## Residuals   536 0.88018 0.0016421                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 16 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.13163 0.0094021  5.8034 1.263e-10 ***
## Residuals   536 0.86837 0.0016201                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 17 :
##              Df Sum Sq   Mean Sq F value   Pr(>F)    
## batch        14 0.0699 0.0049930  2.8774 0.000331 ***
## Residuals   536 0.9301 0.0017353                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 18 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.07199 0.0051425  2.9702 0.0002136 ***
## Residuals   536 0.92801 0.0017314                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 19 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.07846 0.0056041  3.2595 5.335e-05 ***
## Residuals   536 0.92154 0.0017193                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 20 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch        14 0.05513 0.0039381   2.234 0.006036 **
## Residuals   536 0.94487 0.0017628                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 21 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch        14 0.05323 0.0038023  2.1526 0.008535 **
## Residuals   536 0.94677 0.0017664                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 22 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.08955 0.0063964  3.7657 4.409e-06 ***
## Residuals   536 0.91045 0.0016986                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 23 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.10239 0.0073134  4.3671 2.114e-07 ***
## Residuals   536 0.89761 0.0016746                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 24 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.11336 0.0080973  4.8951 1.407e-08 ***
## Residuals   536 0.88664 0.0016542                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 25 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)  
## batch        14 0.03902 0.0027869  1.5545 0.0879 .
## Residuals   536 0.96098 0.0017929                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 26 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch        14 0.05842 0.0041730  2.3755 0.003262 **
## Residuals   536 0.94158 0.0017567                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 27 :
##              Df Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.0849 0.0060642  3.5519 1.275e-05 ***
## Residuals   536 0.9151 0.0017073                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 28 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)    
## batch        14 0.09111 0.0065081  3.8381 3.07e-06 ***
## Residuals   536 0.90889 0.0016957                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 29 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch        14 0.01975 0.0014108  0.7714 0.7008
## Residuals   536 0.98025 0.0018288               
## 
##  Response 30 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch        14 0.02179 0.0015563  0.8528 0.6112
## Residuals   536 0.97821 0.0018250               
## 
##  Response 31 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch        14 0.02555 0.0018248  1.0037 0.4478
## Residuals   536 0.97445 0.0018180               
## 
##  Response 32 :
##              Df  Sum Sq   Mean Sq F value   Pr(>F)   
## batch        14 0.05687 0.0040618  2.3084 0.004376 **
## Residuals   536 0.94313 0.0017596                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 33 :
##              Df  Sum Sq   Mean Sq F value  Pr(>F)  
## batch        14 0.04436 0.0031686  1.7772 0.03882 *
## Residuals   536 0.95564 0.0017829                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 34 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.08067 0.0057624  3.3597 3.277e-05 ***
## Residuals   536 0.91933 0.0017152                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 35 :
##              Df  Sum Sq   Mean Sq F value Pr(>F)
## batch        14 0.03595 0.0025675  1.4275 0.1353
## Residuals   536 0.96405 0.0017986               
## 
##  Response 36 :
##              Df  Sum Sq   Mean Sq F value    Pr(>F)    
## batch        14 0.06901 0.0049292  2.8379 0.0003983 ***
## Residuals   536 0.93099 0.0017369                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Response 37 :
##              Df  Sum Sq   Mean Sq F value  Pr(>F)  
## batch        14 0.05076 0.0036261  2.0475 0.01324 *
## Residuals   536 0.94924 0.0017710                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# use removeBetachEffect

design = model.matrix( ~ Sample+Trimester, data= NormBMlist$phenoDataAll)
y <- removeBatchEffect(NormBMlist$NormMAll, 
                       # batch = NormBMlist$phenoDataAll$Study,
                       # batch2 = NormBMlist$phenoDataAll$ArrayType,
                       # covariates = NormBMlist$phenoDataAl$ControlPC1,
                       covariates = sva_M$sv[,1],
                       design=design)

MDS<- plotMDS(y, top=nrow(y), labels = NormBMlist$phenoDataAll$Sample, gene.selection = "common")

MDSinfo <- ggplotMDS(MDS_norm551 = MDS, 
                    GEO_phenotypes_norm551 = NormBMlist$phenoDataAll, 
                    value = "M_removeBatchEffect")

MDSinfo %>%
  ggplot(aes(x, y)) + 
  geom_point(aes(shape = Tissue, col=Trimester), alpha = 1, size = 5)+ 
  # scale_color_manual(values = namedPal2)+
  scale_shape_manual(values=1:length(MDSinfo$Tissue))+
  labs(x="Dimension 1", y="Dimension 2")+
  theme(text = element_text(size=15))